Have you ever seen the nice "processing" page on sites like Expedia? They are all pretty much the same. Fill out some criteria hit a button and a little animated gif comes up to show you that something is happening in the background. Granted, it's just for perception. All hell could be breaking loose on the backend, but as long as a user can see a spiny icon they are in bliss.
I had to do that for a project. It turns out to be a little harder than I thought. The basic problem I ran into was that an animated gif will stop animating as soon as the location of the page is changed or the form is submitted. Here are a few things I tried that failed:
- Criteria page has a hidden processing image. On click show the image, then submit. Hide the image on load.
Result: image stops animating on submit
- On click redirect to new page that only has the image, auto submit the the page on load, on submit redirect to result page.
Result: image stops animating on submit
- On click redirect to a new page that only has the image, on load of the page change the location using javascript to the result page (same as #2 but instead of submitting a form, I'm changing the location via javascript).
Result: image stops animating
- On click, redirect to new page with iframe, iframe loads another page with processing image. On load of frame page redirect to result page.
Result: image stops animating
So nothing was working. Finally I found something that did work:
On click, redirect to a new page that contains the processing image and an iframe, the iframe points to a page that does all the processing and returns some html. Once the processing is complete, put the html into the session and change the location of it's parent back to the result page. Result page reads the html from the session displays it, then clears it.
Result: Bingo
I don't think this is the best way to do it. Hopefully some people will read this and clue me in. It does work though. A friend suggested I look into Ajax some more. I plan to do that soon, but I just didn't have the time to deal with that before my deadline.
posted on Thursday, March 02, 2006 11:28 AM
Feedback
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
2/7/2008 11:31 PM |
You're an idiot. This is basic. This is why so many websites suck, is people like you are programming.
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
4/13/2008 5:21 PM |
"Post a new comment about this topic"
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
4/13/2008 5:21 PM |
"Post a new comment about this topic"
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
4/13/2008 5:23 PM |
"Post a new comment about this topic"
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
4/13/2008 5:24 PM |
"Post a new comment about this topic"
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
4/14/2008 5:09 PM |
http://alp-tr.blogspot.com/
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
7/11/2008 11:18 PM |
thank you
# re: Processing animated gif ala Expedia that makes users feel ok about waiting for results
10/9/2008 1:40 PM |
Durdin what a wanker you are. You're the idiot to get this to work in IE7 is not that easy.