XMLHttpRequest datacollision

D

dafke

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,
 
M

Martin Honnen

dafke said:
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?
 
D

dafke

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();
 
P

phil_gg04

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,843
Latest member
WizcraftEntertainmentAgen

Latest Threads

Top