Rails Spinoffers:
I need onComplete to run /after/ an Ajax.Request's evalResponse(). I'm
not sure why it runs before; is this an oversight, or do any
applications out there need an onComplete that can access a page just
before it updates? I need to access the updated state. If anyone else
needs the current behavior, can we add an onFinal and run it after the
evalResponse?
Here's my private tweak:
if (state == 'Complete') {
if ((this.getHeader('Content-type') || '').strip().
match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
this.evalResponse();
// avoid memory leak in MSIE: clean up
this.transport.onreadystatechange = Prototype.emptyFunction;
}
try {
(this.options['on' + state] || Prototype.emptyFunction)(transport, json);
Ajax.Responders.dispatch('on' + state, this, transport, json);
} catch (e) {
this.dispatchException(e);
}
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---