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

 

Link to comment
Share on other sites

  • 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? :'(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.