Ajax - Newbie queston regarding XMLHttpRequest - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Ajax - Newbie queston regarding XMLHttpRequest

Portishead850Portishead850 Posts: 2Member
In most examples I found on the Internet , I see something like this :

[color=Blue]ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
document.myForm.time.value = ajaxRequest.responseText;

ajaxRequest.open("GET", "serverTime.php", true);

How is it possible and how does this code work , when the "change state" property is checked
the open and send commands are executed ?
I know it works...but how does the flow return back to "check the state status" after the "open" and "send" are executed.

I would appreciate any help

Many thanks in advance :-)
Sign In or Register to comment.