[jQuery] Re: How to access a JavaScript object from within an ajax call?

2009-10-27 Thread Michel Belleville
He who masters the context shall inherit the JavaScript. ^^v Michel Belleville 2009/10/27 Joe > > Thx!!! This is exactly what i was looking for!!! I knew there was a > simple solution. > > Joe C > > On Oct 27, 11:08 am, Michel Belleville > wrote: > > Well, you're using $.ajax() and the con

[jQuery] Re: How to access a JavaScript object from within an ajax call?

2009-10-27 Thread Joe
Thx!!! This is exactly what i was looking for!!! I knew there was a simple solution. Joe C On Oct 27, 11:08 am, Michel Belleville wrote: > Well, you're using $.ajax() and the context of its callbacks make this the > xhr object, so no surprise there. > > This should work as you expect : > > v

[jQuery] Re: How to access a JavaScript object from within an ajax call?

2009-10-27 Thread Michel Belleville
Well, you're using $.ajax() and the context of its callbacks make this the xhr object, so no surprise there. This should work as you expect : var myself = this; var Zone = function(data) { myself.someInfo = data; myself.load = Zone_Load; }; var Zone_Load = function() { $.ajax({ type: "GET", url: