[XHR] can't get this.readyState to work

Do the examples in the spec work?
http://www.w3.org/TR/2007/WD-XMLHttpRequest-20070618/#examples

I can't figure out how this.readyState works. I tried
adapting the example just a bit:

function handler() {
    alert("@@ handlder state, status:" + this.readyState + "/" +
this.status);
}

client.onreadystatechange = handler;

and I get undefined for this.readyState and this.status.

I'm using firefox 2.0.0.6 on ubuntu linux.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Tuesday, 14 August 2007 02:43:13 UTC