How many XMLHTTPRequests can be made from a single form?

Discussion in 'Software' started by srimansarath, Jan 28, 2013.

  1. srimansarath

    srimansarath

    Joined:
    Jan 28, 2013
    Messages:
    1
    Likes Received:
    0
    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.
     
    srimansarath, Jan 28, 2013
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.