Ajax Post XMLHttpRequest take long time
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
hello i dont know where i had to post this I have a postonly.html page which send a "POST" xmlhttprequest at register.php my problem is while query is complete (and table is updated) extremly fast(1-2 sec) as i can see my database via Putty.exe Responce of the
if(http.readyState == 4 && http.status == 200) { alert(http.responseText); }
is takes about 15 sec (so the alert box pop up) anyone knows any suggestion so it would be response faster? (my get method Ajax works fine and fast)Customer Account Information function postForm() { //var httppost = new getHTTPObject(); var url2 = "register2.php"; var params = "account=testisok&email=yeah"; http.open("POST", url2, true); //Send the proper header information along with the request http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.send(params); http.onreadystatechange = function() { if(http.readyState == 4 && http.status == 200) { alert(http.responseText); } } } function getHTTPObject() { var xmlhttp; if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject){ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); if (!xmlhttp){ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } } return xmlhttp; } var http = getHTTPObject(); // We create the HTTP Object Enter customer ID number to retrieve information: Account: E-mail :