Quote:
Originally Posted by ohgod
so, without looking at code i'm going to assume you're using onreadystatechange to define which step it's at. correct me if i'm wrong.
you're right, it showed the loading image in ie, and not firefox. but... when i hit search in firefox it loaded the results so freakin fast it wouldn't have needed it...
|
Just an update to say that I finally resolved this issue.
readystatechange was the key.
Let me explain for those not too familiar with concept:
If you set the readystatechange optional Boolean parameter to true (asynchronous), your javascript will continue to execute while your browser is waiting for the response from the server.
If you set it to false (synchronous), your javascript will pause until the server responds.
Clearly, if you want to reveal a progress graphic while waiting for the server to respond, this parameter should be set to true, as your javascript will need to run to update your DOM.
I had not set the parameter, presuming the default was true. This didn't present a problem in IE, but in FF, my javascript was pausing.
Setting the parameter explicitly to true sorted the problem in both browsers.