Solved

How does "wait for result" page work?

Posted on 2007-04-02
4
254 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

631 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