Trying my hand a Javascript, I came across an issue with XMLHttpRequest. This is probably something I'm doing wrong, so any help would be appreciated.
reader = new XMLHttpRequest()
reader.open("GET","Votes.xml")
alert(reader.readyState)
reader.send()
alert(reader.readyState)
when I run this, it alerts that the readyState is 1 (Send has not been called) and then stops. If I comment out the "reader.send()" then it continue with the second alert (And all the code that follows). Am I missing something simple?