Hi,
I am working on implementing an ajax script which invokes a servlet to get the data from the back end.
The solution works fine until 10 XMLHTTPRequests are made. After that it is not allowing to make any other requests.
Please find below my code:
var req = newXMLHttpRequest();
//register the callback handler function
var callbackHandler = getReadyStateHandler(req, validateSelectedvalue);
req.onreadystatechange = callbackHandler;
req.open("GET", "/XYZ/servlet/FinderServlet", true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
//get the value from the text input element and send it to server
var testmsg = document.getElementById("identifier_1");
var msg_value = testmsg.value;
if(msg_value.length>0){
msg_value = msg_value.toUpperCase();
req.send("msg="+msg_value);
}
We suspect that the above code is causing this problem as the solution works fine without the above code.
Please let me know if there are any ways to close/dispose the XMLHTTPRequest.
Regards,
Sarath.
|