|
Context-question: msg#00083lang.ruby.rails.spinoffs
As script.aculo.us does not seem to be available these days, Im asking my question instead of looking it up. :-) Im making an Ajax.Request, but would like to maintain the context in the onComplete-function. Fx. ----------------- SNIP ------------------------ function MyClass(){ this.showMsg=function(msg){ alert(msg); } this.myRequest=function(){ var options={ onComplete:function(t){ this.showMsg("Request ended"); } } new Ajax.Request("http://myserver", options); this.showMsg("Request started"); } } var test=new MyClass(); test.myRequest(); --------------- SNAP --------------------------- Its just a dummy function - but it fails because onComplete does no have the right context and therefore can not use this.showMsg(). Any of you guys know how to maintain context? Best Regards Michael Krog |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Project idea: 00083, William Parry |
|---|---|
| Next by Date: | Re: Context-question: 00083, Michael Krog |
| Previous by Thread: | Project ideai: 00083, William Parry |
| Next by Thread: | Re: Context-question: 00083, Michael Krog |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |