views:

39

answers:

1

Hi folks

This one's perhaps a little long-winded, but it's really baffling me and a couple of other people.

We've got a progress bar that's updated during file uploads. The JS is here (too much to paste into this body).

Basically, the form submit event starts a timer loop which, every 2 secs, fires a $.getJSON() call to the server to retrieve a pair of values about the status of the upload. These values are then passed to a function that updates the progress bar. The JSON values returned are def valid JSON.

Now, this code works fine on Firefox and all IEs (even 6), so I'm pretty confident that the server-side code is robust, but... in Safari and Chrome, the progress bar just doesn't update at all.

The upload is processed by Apache fine, and console.log() debugging shows that the timer loop is definitely running -- it's just that getJSON seems not to be firing (the web inspectors don't show the call, and neither does the Apache log.

As said, it's a bit baffling. Anyone come across this before with Chrome/Safari/Webkit?

A: 

Perhaps this question can provide a few ideas about debugging. I have found both Safari and Chrome to be somewhat buggy with the way they handle JS as well, so, you're definitely not alone.

Thanks for the support. I've tried lots of debugging methods, but not yet jQuery.ajaxSetup. Will give it a go
stevejalim