473,626 Members | 3,246 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 1176


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
953
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
11728
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
11480
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
2388
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
4023
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
5295
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
2299
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
8269
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
8711
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...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
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
8512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7203
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...
1
6125
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
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...
1
1815
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.