[development] Bug in HTTPGet/HTTPPost?

Rowan Kerr rowan at stasis.org
Fri May 19 14:48:56 UTC 2006


David Carrington wrote:
> On 18/05/06, Justin <rocketfuel at 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.



More information about the development mailing list