Solved

How does "wait for result" page work?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
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 …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.

739 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