Solved

How does "wait for result" page work?

Posted on 2007-04-02
4
252 Views
Last Modified: 2013-12-25
How does "wait for result" page work?
On web pages, somestimes when you submit a request for which it takes some time, there is an intermediary page that appears saying "please wait" or show some "sand-clock" type of .gif picture. Then when the result is ready, the page is displayed.
Q: Does it wait a certain number of seconds before showing result? or does the result page actually communicate with the intermediate page to tell it to proceed to the next page?

Thank you.

Please post a sample code of how that might work?

I looked at the "source" of that intermediate page and found this code, but don't know how to integrate it:
<form name="Form1" method="post" action="WaitForResults.aspx?LoanWizardGuid=56f59414-42c9-417e-95ff-2f0cb1eef0b6&amp;lw_id=35647" id="Form1">
0
Comment
Question by:spoowiz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
eivo earned 250 total points
ID: 18850151
the main idea of this type of page, is simply to display something pretty whilst your use waits for a result
it's not sensible to mock these up, its just irritating.

it's a very simple effect to achieve
simply return to the user some type of data, e.g. an image tag or something before doing a server intensive task
after the task is complete, your program will move on the the next line, when you can either display the results, or redirect the user to a page wherein their results will be displayed after generation

an example codeblock:

<img src=waiting.png />
<%
myserverintensivefunction()
'you may want to write something to pass variables to a results page here or not. it depends what you're actually doing
response.redirect "results page"
%>

using this waiting.png or for that matter, whatever code you fancy  (it could be an entire formatted html document - it really doesnt matter) would be displayed before the code is processed. once processing of myserverintensivefunction() is complete, the asp script will automatically redirect the user to the results page, or if you fancy, simply dump the results on the page.

there is no need for any complicated server communications or dodgy guesses at the time it will take to process, the server simply tells the browser to redirect when it's done whatever you want it to do in th middle.

I hope this is clear and useful to you.
0
 
LVL 29

Assisted Solution

by:rdivilbiss
rdivilbiss earned 250 total points
ID: 18877141
I wrote a little demo of this in the past using classic ASP, but you will find it applicable for ASP.NET as well, or PHP for that matter.  I found that it was far better to use server.transfer rather than response.redirect however.  Code is in the page.

http://www.rodsdot.com/ee/progess_bar_form_handler.asp
0
 

Author Comment

by:spoowiz
ID: 18914086
thank you.
0
 
LVL 29

Expert Comment

by:rdivilbiss
ID: 18914090
Your welcome.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question