nicktherockstar Posted November 28, 2008 Share Posted November 28, 2008 Good afternoon guys! I have another problem for your help if possible, It would be really great if you could help 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 Cheers Nick Quote Link to comment Share on other sites More sharing options...
Psycho Posted November 28, 2008 Share Posted November 28, 2008 Try this: function runOnLoad() { getLiveData('index.php?cont=1','myDiv1'); getLiveData('index.php?cont=2','myDiv2'); getLiveData('index.php?cont=3','myDiv3'); } <body onload="runOnLoad();"> Quote Link to comment Share on other sites More sharing options...
nicktherockstar Posted November 28, 2008 Author Share Posted November 28, 2008 haha! why is it always so obvious once its been pointed out Thanks so much! Quote Link to comment Share on other sites More sharing options...
thecard Posted November 30, 2008 Share Posted November 30, 2008 Click "topic solved". Quote Link to comment Share on other sites More sharing options...
nicktherockstar Posted December 9, 2008 Author Share Posted December 9, 2008 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? :'( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.