G
Gandalf
Hi everyone,
I building an Ajax application that need a while before it return
back the data.
How can I check with javascript if the application status is 'loading'
to show the user a message or something?
p.s: I tried to use if(http.realState==2 || http.realState == 3 ) in
the function that send the request
like this:
get_lines.open("POST", 'calc.php', true);
get_lines.setRequestHeader('Content-Type','application/x-www-form-
urlencoded');
if(get_lines.readyState == 3){
document.getElementById('loading').style.display='';
}
get_lines.onreadystatechange = handleCalc;
and it didn't worked
thanks
I building an Ajax application that need a while before it return
back the data.
How can I check with javascript if the application status is 'loading'
to show the user a message or something?
p.s: I tried to use if(http.realState==2 || http.realState == 3 ) in
the function that send the request
like this:
get_lines.open("POST", 'calc.php', true);
get_lines.setRequestHeader('Content-Type','application/x-www-form-
urlencoded');
if(get_lines.readyState == 3){
document.getElementById('loading').style.display='';
}
get_lines.onreadystatechange = handleCalc;
and it didn't worked
thanks