[jQuery] Callback in $.getJSON is called but variable assignment doesn't persist.

2010-01-04 Thread Ido Yehieli
Hi, on the following code: $.getJSON(http://www.tametick.com/test2/json/settings.json,function (data) { this.Settings = data; alert(data); alert(this.Settings); }); which can be found on http://www.tametick.com/test2 (line 63 in http://www.tametick.com/test2/js/cardinal-quest.js), I

RE: [jQuery] Callback in $.getJSON is called but variable assignment doesn't persist.

2010-01-04 Thread Josh Nathanson
Probably an async issue - any code after the $.getJSON call (but not in the callback) will get executed before the async call returns. Any code that is dependent on this.Settings being set with the returned data must be within the callback function. Also this is probably not what you are