M
Mike
Hello,
I have a function called stateChanged:
function stateChanged()
{
alert(xmlHttp.readyState)
if (xmlHttp.readyState==4)....................
...............................
}
When I call it with:
xmlHttp.onreadystatechange=stateChanged()
I get an error: Type mismatch.
When I call it with
xmlHttp.onreadystatechange=stateChanged
It runs fine.
Whats wrong with the parenthesis in the function call?
Thanks
Mike
I have a function called stateChanged:
function stateChanged()
{
alert(xmlHttp.readyState)
if (xmlHttp.readyState==4)....................
...............................
}
When I call it with:
xmlHttp.onreadystatechange=stateChanged()
I get an error: Type mismatch.
When I call it with
xmlHttp.onreadystatechange=stateChanged
It runs fine.
Whats wrong with the parenthesis in the function call?
Thanks
Mike