In Prototype when I shoved some returned HTML in a div, iframe, etc, I
would set the "evalScripts: true" option in the updater. Is there an
equivalent for MochiKit for any XmlHTTPRequeset content to have it's
javascript executed? The prototype code looks like:
extractScripts: function() {
var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
return (this.match(matchAll) || []).map(function(scriptTag) {
return (scriptTag.match(matchOne) || ['', ''])[1];
});
},
evalScripts: function() {
return this.extractScripts().map(function(script) { return
eval(script) });
},
For my particular example, I am using the ThickBox.js MochiKit port
(http://jasonbunting.com/blahg/PermaLink,guid,297d24b0-
f5e8-47d1-82e2-1804133fc6bf.aspx ) and am trying to get returned HTML
shoved into the iframe to evaled so functions are locally available.
Thanks for any pointers...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---