471,316 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

XMLHttpRequest datacollision

Hi, I'm working on a live chat with a XMLHttpRequestengine.
The script is working fine except for one thing. Although I use the
asynchronous mode, the script seems to have a little refractionairy
period.
I have three XMLhttpRequest objects loaded, one for checking for new
text and one to check for new users. And the last one is made when the
user wants to send a message.
Most of the hime everything works fine, however sometimes the user who
sends text doesn't receive this text back. The other users do see the
text. Has anyone some experience with it?

The chat is running on http://www.fiaminga.com/login.html. ( still not
fully operational and no lay-out applied). Just see the sourcecode as
usual.

Thanx,

Jul 23 '05 #1
3 1119


dafke wrote:
Hi, I'm working on a live chat with a XMLHttpRequestengine.
The script is working fine except for one thing. Although I use the
asynchronous mode, the script seems to have a little refractionairy
period.
I have three XMLhttpRequest objects loaded, one for checking for new
text and one to check for new users. And the last one is made when the
user wants to send a message.
Most of the hime everything works fine, however sometimes the user who
sends text doesn't receive this text back. The other users do see the
text. Has anyone some experience with it?


Does that happen with one particular browser supporting XMLHttpRequest
or does it happen with several ones?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
It happens aswel with IE as with Mozilla, however Mozilla seems to give
more problems then IE.

this is the snippet on the activition of the (activeX)objects
function httpObject()
{
var xmlhttp
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e)
{
try
{
xmlhttp = new XMLHttpRequest();
}
catch(e)
{
alert('no object made');
xmlhttp = false;
}
}
}
return xmlhttp;
}
var http = httpObject();

Jul 23 '05 #3
> I'm working on a live chat with a XMLHttpRequestengine.

I can thoroughly recommend the Sarissa library for this sort of thing.
It hides all the platform differences perfectly. It's on sourceforge.
I have three XMLhttpRequest objects loaded, one for checking for new
text and one to check for new users. And the last one is made when the user wants to send a message.


You might like to have a look at Anyterm, which has to solve a similar
problem.

--Phil.

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by dafke | last post: by
10 posts views Thread by Matt Kruse | last post: by
13 posts views Thread by TLaufenberg | last post: by
5 posts views Thread by Peter Michaux | last post: by
1 post views Thread by geevaa | last post: by
6 posts views Thread by Patrick Nolan | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.