Solved

How does "wait for result" page work?

Posted on 2007-04-02
4
241 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
Comment Utility
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
Comment Utility
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
Comment Utility
thank you.
0
 
LVL 29

Expert Comment

by:rdivilbiss
Comment Utility
Your welcome.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This video teaches users how to migrate an existing Wordpress website to a new domain.

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now