Re: [jQuery] Re: Save javascript variable via jquery

2009-12-04 Thread Michael Geary
Your first example doesn't work because getJSON doesn't return the JSON data as its return value; it *calls a function* and passes the data as an argument to that function. Remember that getJSON is asynchronous. The call to getJSON returns before the data is even downloaded. Any time you have asyn

[jQuery] Re: Save javascript variable via jquery

2009-12-04 Thread m.ugues
I tried this way: http://pastie.org/727632 The div is appendend but the javascript declaration not: Any idea? Kind regards Massimo On 4 Dic, 16:13, "m.ugues" wrote: > Hallo all. > I would like to save the response of an AJAX call in a variable > declared in the document ready in parent page.