bizt meinte:
Quote:
ajax.setReadyStateChangeFunction(doSomething);
ajax.sendRequest('data/note.xml', 'GET');
Your setting the response listener, trigger the request...
Quote:
//ajax.setReadyStateChangeFunction(doSomethingElse);
....and overwrite the previously assigned response listener with a new one.
Quote:
//ajax.sendRequest('data/cd_catalog.xml', 'GET');
Quote:
Does XmlHttpRequest only allow one request at a time?
An instance of the XmlHttpRequest-Object can handle one request at a
time. However, you can have plenty of instances.
Quote:
Should I perhaps
implement some kind of queueing system for requests (when one request
is in progress, the others are added to an array - when readystate = 4
the next is run .. if this is possible, not tried it yet)?
Yes.
Quote:
Any other suggestions/imporvements as this is my first attempt,
genarally looking for something thats lite and fast?
So far I haven't needed a queue. Aborting a previous request and
starting a new one gets the job done - for my applications. In this case
[1] might be interesting.
Gregor
[1] <http://www.quirksmode.org/blog/archives/2005/09/xmlhttp_notes_a_1.html>
--
http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
http://web.gregorkofler.com ::: meine JS-Spielwiese
http://www.image2d.com ::: Bildagentur für den alpinen Raum