Via Google search, I found this answer today here:
http://stackoverflow.com/questions/278122/how-to-force-javascript-to-execute-within-html-response-to-ajax-request
I have it "half" working. What I mean is, my response text comes back
and updates my div perfectly with the HTML when evalScripts: false,
however the scripts within the HTML are of course not executed. When I
set evalScripts: true, then the ONLY thing that executes is the
scripts and it outputs it directly to the page instead of loading it
into the div.
I think the problem is that the scripts I am trying to execute are
likely document.writes generated by the Maani charts (http://
www.maani.us/xml_charts/index.php) and so instead of loading text into
the div, the executed scripts just write themselves out to the
browser.
Any ideas on how I can fix this? Here's my Prototype code:
function runCalcs() {
var request = new Ajax.Updater
(
"result_tab_frame","ajax_runCalcs.asp",
{
method: "get",
evalScripts: true,
onSuccess: function () {
document.getElementById("loading").className = "clsHide";
}
}
);
}
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.