Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-15-2011, 07:22 PM   PM User | #1
gani
Regular Coder

 
Join Date: Nov 2008
Posts: 165
Thanks: 0
Thanked 0 Times in 0 Posts
gani is an unknown quantity at this point
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
gani is offline   Reply With Quote
Old 05-15-2011, 09:24 PM   PM User | #2
oesxyl
Master Coder


 
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
oesxyl is a jewel in the roughoesxyl is a jewel in the roughoesxyl is a jewel in the rough
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
oesxyl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:13 AM.


Advertisement
Log in to turn off these ads.