19 May
2006
19 May
'06
4:48 p.m.
David Carrington wrote:
On 18/05/06, Justin <rocketfuel@spaceship.com> wrote:
Reading the MS docs, I learned that it is the send() method which will update the ready state, and so the handler should be set between the open() and send() calls.
I think onreadystate change should be set before open(). See http://www.w3.org/TR/XMLHttpRequest/#dfn-readystate
Yeah, since it's a callback you're best to set it after you create the object, and before you actually start working with it. It's testing for readyState == 4, so any extra state changes won't negatively affect anything.