Dear All,
Please excuse the following thickness, I am new to client scripting.
I have set up a page comprising of three DIVs, the content of which
gets changed by XMLHTTP requests (including the following code in a
function).
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
document.getElementById(loc).innerHTML = xmlhttp.responseText;
}
My problem is when the page first loads. I had assumed that I could
just use onLoad to run a function that gets the data, but it gets
confused by the fact that it receives three queries in rapid
succession, before the server has had time to reply. How could I go
about queuing the requests so that they wait for one to load before the
next on triggers?
Everything works so well if I manually set up the pages - this is one
of the last hurdles I need to get through to have a promising looking
prototype. I am so impressed with how much more can be done with
JavaScript that when I last used it (a few years ago now) - no more
pages that strobe a rainbow of colours when you visit them!
I'd gratefully appreciate any advice that you (my obvious intellectual
superiors!) could provide on the issue.
Thank you kind Sirs (and Ladies),
Dan
(email not working - group reply appreciated)