In my application, I am calling a method for every 1000ms to check the document readyState
. Following is the code which I am using:
var success=setInterval(""CheckState()"",1000);
function CheckState(){
if($get('businessDownl').document.readyState=="interactive" ||
$get('businessDownl').document.readyState=="complete"){
alert("Great");
clearInterval(success);
}
}
This code works fine in IE browser, but fails in Firefox and Chrome browsers. I tried using
$get('businessDownl').readyState
also, it is printing as undefined. Can anybody tell me how to use the readyState
for Firefox and Chrome in the above scenario?