Jump to content

Google Chrome AJAX issue: onreadystatechange never triggering


DarkSnake747

Recommended Posts

On my site, I have 1 or 2 areas on the page at a time that displays some list of people. To ensure code is not duplicated, I have a php script that dynamically builds the JavaScript needed for each page that uses control flags to prevent the same js code from being added more than 1 time. The syntax of the JS is correct. That said, here's what happens...

 

Click on a member name and a loading pane appears and then the request is made.

The onreadystatechange is set inline to a function that takes the returned data and displays it in place of the loading bar.

 

It is really quite simple... however, Google Chrome doesn't finish the process. It seems (after placing an alert in the onreadystatechange function) that the ready state is not changing... or at least it is not triggering the event. It doesn't work randomly on several pages, and other pages it never works - all in Chrome. IE and FF handle it fine.

 

If you want to see it in action, go to evileyegames.com, create an account, and go to the Friends and Foes pages... then the sub page for "Others" (people you are neither friend nor foe with). Click a name and check it out. I used dev tools to monitor it. The readystate does change... according the tool, but the function is never triggered. As for success or not on the request, reviewing the resources in the dev tools shows the request and the completely correct response.  :-\ so confused...

 

Any ideas? Help?  :)

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.