[Javascript] Multiple ajax calls onload

Peter Brunone peter at brunone.com
Wed Jul 25 11:53:48 CDT 2007


If I had to guess from this limited information, I'd say you have only one request object which is loading each piece in turn and overwriting the previous one in memory, so only the last one is noticed.

FWIW...

Peter

----------------------------------------

From: "Murphy, Matt" Matt.Murphy at thermofisher.com

All, 

I thought I had this ingenious idea, to make a slow-loading page load
faster, I'd break up the sections into divs, and then call a series of
ajax functions to populate those divs asynchronously. 

Problem is, only the last one called shows up. I can see in the firefox
error log that both document.getElementById('mydiv').innerHTML="myhtml"
calls ran, (the output of the php scripts called) but only one showed
up. 

Here's the js I'm using to call my ajax functions:

Should this work? Is there a better way? 

Thanks,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070725/b499c290/attachment.htm>


More information about the Javascript mailing list