I\'m sending a jquery get request like so:
$.get($(this).attr(\"href\"), $(this).serialize(), null, \"script\");
The response I expect to r
Jose Basilio's answer is okay, but I recommend replacing eval with jQuery's globalEval function...
$.get($(this).attr("href"), $(this).serialize(), function(data) {
script = $(data).text();
$.globalEval(script);
});
globalEval is the function that would normally be called when you call an ajax method with a return type of script.
This from the API documentation...
This method behaves differently from using a normal JavaScript eval() in that it's executed within the global context (which is important for loading external scripts dynamically).