Variable code in AJAX coding -


i found code fore ajax tutorial,and not familiar part of code there

ajaxrequest.onreadystatechange = function(){         if(ajaxrequest.readystate == 4){             document.myform.time.value = ajaxrequest.responsetext;         }     }     ajaxrequest.open("get", "pay.php", true);     ajaxrequest.send(null);  

can please tell me above code means,are there variables,etc? aware pay.php php file reffers to,but first 3 line of coding mean?

the xmlhttprequest object has property called readystate. status of server's response stored. response can processing, downloading or completed. each time readystate changes our onreadystatechange function executes.

when property readystate 4 means response complete , can data.

the function refers textbox named time,in form named myform"the value taken code in pay.php file.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -