('cool beans');
-Mike
-Original Message-
From: jquery-en@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Ofjquertil
Sent: Tuesday, July 08, 2008 1:37 AM
To: jQuery (English)
Subject: [jQuery] Re: $.getScript() - how to load into JSON
formatted object?
thanks
thanks for the answer Mike. I probably wasn't very clear.
I'm trying to make the loading happen as part of
blah.something(variable).
something kinda like this:
var blah ={
dynaLoad : function(variable){
$.getScript('alert.js',variable) // the script would simply
contain the line
This is all from the same domain, so you don't have cross-domain issues,
right?
I just tried this code, and it works nicely:
$.get( 'alert.js', function( code ) {
var blah = {
something : new Function( 'variable', code ),
something_else : 'hello'
};
3 matches
Mail list logo