Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var js_xmlHttp=false;
- function runAjax(){
- js_xmlHttp=new XMLHttpRequest();
- var js_temp1=document.getElementById("id_username").value;
- var js_temp2=document.getElementById("id_password").value;
- var js_data="username="+js_temp1+"&password="+js_temp2;
- js_xmlHttp.open("POST","Display_Ajax.php",true);
- http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- http.setRequestHeader("Content-length", js_data.length);
- http.setRequestHeader("Connection", "close");
- js_xmlHttp.onreadystatechange=function(){
- if(js_xmlHttp.readyState==4 && js_xmlHttp.status==200){
- document.getElementById("id_display").innerHTML=js_xmlHttp.responseText;
- }
- }
- js_xmlHttp.send(js_data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement