[Javascript] Two questions about AJAX

Dave Shaw dshaw256 at earthlink.net
Sun Apr 20 13:52:58 CDT 2008


Hi! Pardon me if this is repetitive. I'm new to AJAX and have a couple
of questions to which I have not been able to find answers by searching
the 'net.

First, must I use a new XMLHttpRequest object for each interaction with
my server, or can one such object be reused for multiple interactions?

Second, the first time I tried using AJAX I managed to kick off two
requests simultaneously, using two XMLHttpRequest objects, two
onreadystatechange functions, etc. I was using Internet Explorer 7, and
this worked fine. But when I tried the same page using Firefox, one or
the other request would complete but the other would fail. I recoded to
ensure that the requests would be issued serially. But in general,
should I be able to have multiple asynchronous requests outstanding at
the same time, or should I ensure that there is only one request pending
at a time?

Thanks much for the help!

Dave Shaw

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


More information about the Javascript mailing list