[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-16 Thread jquertil
('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

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-08 Thread jquertil
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

[jQuery] Re: $.getScript() - how to load into JSON formatted object?

2008-07-06 Thread Michael Geary
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' };