473,594 Members | 2,663 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 XMLHttpRequeste ngine.
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 1174


dafke wrote:
Hi, I'm working on a live chat with a XMLHttpRequeste ngine.
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)object s
function httpObject()
{
var xmlhttp
try {
xmlhttp = new ActiveXObject(" Msxml2.XMLHTTP" );
}
catch(e)
{
try {
xmlhttp = new ActiveXObject(" Microsoft.XMLHT TP");
}
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 XMLHttpRequeste ngine.

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
952
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 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...
10
14079
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. So I'm wondering if I'm missing something? My test code is as follows: function myObj() { var req = new Object(); req.temp = 0;
21
11717
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, starting in IE7 XMLHttpRequest will be a plain JavaScript object. It will still include the Microsoft.XMLHTTP ActiveX component for compatibility, but IMHO this is a very good shift for IE. What do you think?
13
11477
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 Mac computer. IE and FireFox on a Windows based system works just fine. The problem I am having is that the XMLHttpRequest doesn't open the site that I've programmed into it. When I check the readyState it only returns 0 and never goes through the...
5
2383
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 HTTP Request object." In my haze of testing yesterday it seems that NN6.1 provides an non-functional XMLHttpRequest object and NN6.2 XMLHttpRequest object
1
4021
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 technology is implemented on more sites now than ever. Compatibility is no longer an issue (IE, Mozilla and Opera all support it), and the benefits to using it are amazing. There are too many PHP programmers avoiding any
1
5293
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? Here's my code: The function mySaveFunction() is called by clicking the "Update" button, after the user changes the data which is populated in the form fields, which was retrieved via XMLHttpRequest from an XML external file. I know that...
6
2297
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 causing trouble. It chokes on this: if (window.XMLHttpRequest) nameReq = new XMLHttpRequest(); else if (window.ActiveXObject) nameReq = new ActiveXObject("Microsoft.XMLHTTP");
0
7954
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8016
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6669
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5415
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3871
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3905
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1487
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.