Ok. I'm making an ajax-enabled lab scheduling program, and some of the ajax operations aren't exactly quick. In Gmail, when you go to your inbox, send a message, etc. the browser acts like it's loading (In FF the stop button becomes enabled, the progress bar appears), but it's not on a new page, it's done via AJAX. How do they do this? I have a little spinny indicator, but it would be a nice touch to have the browser act like it's loading. Any ideas? Thanks in advance.
A:
This article has details about different types of requests and whether they trigger busy indicators like the progress bar.
Annie
2009-12-16 22:27:15
hmmm. interesting. is there some function I can call, something to do that triggers it (I don't want to change all my request types and stuff)?
Michele N.
2009-12-16 22:31:53
A:
AJAX cannot trigger the browser's "loading" mechanism, as the first A in AJAX is "Asynchronous", meaning (in so many words) that calls are done without refreshing the page. In actuality, when you see the "loading" bar pop up the page is being refreshed, but in FF, it doesn't look like it is because of the way it caches.
Jason
2009-12-16 22:30:17
Then how does gmail's 'loading' thingy in the top-center stay there the whole time, and go away at the right time?
Michele N.
2009-12-16 22:33:13
@Michele: The "Loading" notice at the top of your screen is probably just given `display:block;` when the script starts and given `display:none;` when it's finished. That's much different from getting the progress bar to appear.
Jeff Rupert
2009-12-16 23:30:33
A:
Think this is your answer:
http://www.obviously.com/tech_tips/slow_load_technique
Looks like gmail and facebook method (browser is showing page as "loading" with loading icons etc. - it is just simulating, because there is a background ajax request) :)
s3m3n
2010-06-30 01:10:07