Jump to content

calling a function multiple times with different param's


nicktherockstar

Recommended Posts

Good afternoon guys!

 

I have another problem for your help if possible, It would be really great if you could help :D

 

I have an Ajax Javascript that I call

 

e.g. onload="getLiveData('index.php?cont=1','myDiv1')"

 

It accepts an input of a page and a div, it will then fill the div with the result of the page. simple stuff and works great!

 

now...

 

What I would really like to do its be able to call the same function with different params many times

 

e.g. onload="getLiveData('index.php?cont=1','myDiv1'); getLiveData('index.php?cont=2','myDiv2');"

 

I have found when you do this only the final call in the list actually happens. Any help with this one would be great! Thought I susspect it cant be done ;D

 

Cheers

 

Nick

 

  • 2 weeks later...

I would but it isnt quite solved yet...

 

The problem is it doesnt work ???

 

I think because the script that is called first is still running it wont call again.

 

if you put an alert between each and wait for the ajax element to load into place then click ok so it goes on to call 2 its fine, but without waiting for the previous load to finish it does not work :-[

 

any clues? :'(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.