XML responses from my webapp have both HTML to add to the page AND some have a script to run.
I\'m trying to send back XML from my webapp like:
You'd rather send JSON, it's way easier to interpret. Example:
// Suppose your response is a string: // { html: "add me to the page, script:"alert('execute me');" } var obj = eval( "(" + response + ")" ) ; eval( obj.script ) ;
add me to the page