XMLHttpRequest datacollision

Discussion in 'Javascript' started by dafke, May 4, 2005.

  1. dafke

    dafke Guest

    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,
     
    dafke, May 4, 2005
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, May 4, 2005
    #2
    1. Advertising

  3. dafke

    dafke Guest

    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();
     
    dafke, May 4, 2005
    #3
  4. dafke

    Guest

    > 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.
     
    , May 5, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Trip

    XMLHttpRequest + XMLDOM

    Trip, Oct 8, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    462
  2. =?Utf-8?B?QnJhdm8=?=

    XMLHTTPRequest with Xpath is not working

    =?Utf-8?B?QnJhdm8=?=, Apr 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    553
    =?Utf-8?B?QnJhdm8=?=
    Apr 1, 2004
  3. Steve

    XMLHttpRequest help

    Steve, Mar 21, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    646
    Steve
    Mar 22, 2005
  4. Trip

    XMLHttpRequest + XMLDOM

    Trip, Oct 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    519
    intrader
    Oct 11, 2005
  5. dafke
    Replies:
    0
    Views:
    374
    dafke
    May 4, 2005
Loading...

Share This Page