Minor typo: (there are probably more - code is untested but it's the thought that counts. ;-) this.xmlHttp.onreadystatechange=stateChanged; should be this.xmlHttp.onreadystatechange=this.stateChanged;