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
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs