I'm trying to use javascript to perform a simple POST operation. In fact, I don't even need to get the response. I only need to do the post so that the other page can save the info to a database.
This code works initially, but then the post stops occurring. As a user, I can click it over and over and over again. On the technical side, the POSTs occur for the first few clicks, but then the post stops occurring.
Why would it stop posting the information? Am I missing a line of code?
Here is my javascript code for IE:
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp) {
var paramStr = "";
paramStr += "strTitle=HelloWorld";
paramStr += "&strEmail=me@somewhere.com";
xmlhttp.setRequestHeader("Content-Type","text/html; charset=iso-8859-1");
xmlhttp.open("POST","http://www.mysite.com/something.php",true);
xmlhttp.send(paramStr);
} // end if