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
Solved

How does "wait for result" page work?

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Read about why website design really matters in today's demanding market.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.

839 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