Thomas 'PointedEars' Lahn <> writes:
> Martin Honnen wrote:
[XMLHttpRequest]
>> First make the open call, then set the onreadystatechange handler [...]
>
> Does not make sense to me. Why?
Why it doesn't make sense to you? Who knows
Anyway: The "open" call doesn't make the connection, it merely sets up
the request-object. The actual connection is created when the "send"
method is called, and the ready-state will not change until this
point. That means that it's safe to assign the handler after the call
to "open".
Some browsers will not honor event handlers set before the "open"
call, as if that call completely initializes the object.
/L
--
Lasse Reichstein Nielsen -
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'