473,500 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1163


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
949
by: dafke | last post by:
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...
10
14059
by: Matt Kruse | last post by:
I'm aware of the circular reference memory leak problem with IE/closures. I'm not sure exactly how to resolve it in this situation. Also, Firefox appears to grow its memory size with the same code....
21
11689
by: Joe Attardi | last post by:
Hey all! I was reading over at the IE Blog the other day http://http://blogs.msdn.com/ie/] and read some interesting, and encouraging news. According to Sunava Dutta, an IE Program Manager,...
13
11447
by: TLaufenberg | last post by:
I'm new to Javascript programming and I've run into a bit of a snag with making an XMLHttpRequest in the Safari browser. Actually, the request doesn't work in Firefox either but only when I use a...
5
2370
by: Peter Michaux | last post by:
Hi, The FAQ correctly says the following: "Mozilla (NN6.2+, Firefox, Ice Weasle etc), Opera 7.6+, Safari1.2+, the Windows version of IE versions 5+, and some other browsers provide the XML...
1
4011
by: geevaa | last post by:
http://www.phpbuilder.com/columns/kassemi20050606.php3 XMLHttpRequest and AJAX for PHP programmers James Kassemi Introduction: Although the concept isn't entirely new, XMLHttpRequest...
1
5285
by: Tarik Monem | last post by:
OK, I'm pretty sure this cannot work because I'm trying to use JavaScript (client-side) to write to an xml file (which is server-side) using XMLHttpRequest. Can I use PHP do what I'm trying to do?...
6
2290
by: Patrick Nolan | last post by:
I'm working on cross-platform portability of some javascript. My Macintosh testing platform is rather old. It has Safari 1.3.2 and Internet Explorer 5.2. I got Safari working, but now IE is...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.