I’m sending an Ajax call to a server and trying to call another function when the response is ready (readystatechanged). The serverside code is non existent at this moment. The “another” function call fails with Chrome and Firefox. Unexpectedly, Internet Explorer 8 has no trouble calling the function.
I’m able to create the XMLHttpRequest object in Chrome and Firefox (and an ActiveXObject in IE8). I also am able to use open and send and receive readystatechanges and statuscodes. What chrome and firefox are unable to do is call the functions “drawTable()” and “drawChart()”
if( xhr.readystate == 4 && xhr.status == 200 )
{
drawTable();
drawChart();
}
I can traceback the execution with Firebug and Google Chrome Script tool to the above if-statement. The member variables readystate and status have the correct values. Unlike IE8, Chrome and Firefox will not simply call the functions.
You have a typo. The property is actually
readyState(note the uppercaseS).