Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple ajax calls

    I want to run 500 ajax calls at once (please dontn ask why )

    I can not run all of them using one function getXMLObject();

    How can I do this using a script

    Code:
    var xobject = getXMLObject();
    var xobject2 = getXMLObject();
    var xobject3 = getXMLObject();
    var xobject4 = getXMLObject();
    var xobject5 = getXMLObject();
    var xobject6 = getXMLObject();
    ...and so on
    I do not know how to dynamically name the new XMLObject

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    maybe this:
    Code:
    var i, xobjects = [], hmmm;
    for(i = 0; i < 500; i++){
       hmmm = getXMLObject();
       if(hmmm){
          xobjects.push(hmmm);
       }
    }
    then do something with xobject[whatever], whatever is something between 0 and 499.

    best regards


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •