Author Topic: Random failur of ajax calls.  (Read 401 times)

0 Members and 1 Guest are viewing this topic.

Offline this.userTopic starter

  • Enthusiast
  • Posts: 52
    • View Profile
Random failur of ajax calls.
« on: May 18, 2010, 07:05:53 AM »
I have a site, where people can go and create chat sessions, which they can use and return to at anytime. however when you are in a chat session, the ajax call (which occures every second) fails and ends the session at random. I have spent a lot of time trying to figure out what is going on with no luck.

firebug points to line 5252 in the jquery script here is ascreen shot: http://i.imgur.com/AK4pv.png

Here is what is at that line:

 
Code: [Select]
   // Send the data
    try {
        xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
    } catch(e) {
        jQuery.handleError(s, xhr, null, e);
        // Fire the complete handlers
        complete();
    }

    // firefox 1.5 doesn't fire statechange for sync requests
    if ( !s.async ) {
        onreadystatechange();
    }

the js code I am using is at http://www.keychat.com/include/js/index.js I would really appreciate any help.

If there is something wrong with my code, it there is a more efficient way of doing something than what I have, please let me know. I welcome any advice, suggestion, and help.

its happening in FF, IE, and Chrome.