Hi,
I have a text field and when user enters few characters in this textfield ,it creates an Ajax request and searches the data from db and populate a dropdown which is next field .
This functionality is working fine but currently observed an issue that if user keeps entering the characters and back space in text field(say 15-20 times)
eg: User enters 'a' and then back space and then enter 'ab' and then backspace and enter 'abc' and so on .
For first 15 requests Ajax call is working fine and data is populating properly however between 15-20 request some where it hangs and I debugged the code and found that all of a sudden request.responseXML becomes null which caused the page to hangs.
Does any one know why after 15 request all of a sudden request.responseXML becomes null . Is there any limitations of number of response in AJAX.
Below is sample code which i am using .
var http = getXMLHTTPRequest();
var modurl = "/url + encodeURI(textEntered);
http.open("GET", modurl, true);
http.onreadystatechange = function() {
try{
if (http.readyState == 4) {
if(http.status == 200) {
var res= http.responseXML;
if (res != null) {
// Some Code here
}
}
http.send(null); }
Thanks in advance for your response.