[jQuery] Re: getJSON returning undefined instead of XMLHttpRequest

2009-09-20 Thread Blixa
might use a closure with setTimeout or any > other async function: > > function delayedAlert( time, message ) { >     setTimeout( function() { >         alert( message ); >     }, time ); > > } > > delayedAlert( 1000, 'one second' ); > delayedAlert( 1

[jQuery] Re: getJSON returning undefined instead of XMLHttpRequest

2009-09-19 Thread Blixa
ave to > use the callback function and call any other functions you need from there. > > -Mike > > On Sat, Sep 19, 2009 at 1:16 PM, Blixa wrote: > > > I am using getJSON to get results from a different domain and i wanted > > to get _some_ object back when call

[jQuery] getJSON returning undefined instead of XMLHttpRequest

2009-09-19 Thread Blixa
I am using getJSON to get results from a different domain and i wanted to get _some_ object back when calling getJSON so that i can insert some variables into the callback scope. Basically, what i wanted to do was this: var new_json = $.getJSON(url, function(data) {