?
Solved

displaying waiting page

Posted on 2003-02-24
3
Medium Priority
?
305 Views
Last Modified: 2012-06-27
I have a webpage that get the data from database and it takes quite awhile to do this and i want to display it as soon as it done...
the problem is before i display the data I want the user to see the another page with a .gif animation on it and it said "please wait, processing your order."
how do I do this ? i did java script "onLoad" and redirected to the result on the waiting page but the gif image doesn't animate.

here is the waiting page

     <html>
     <script type="text/javascript">
         
          function loadit(){
               window.location = 'result.asp?sOrder=10';
          }
     </script>
     <title>processing order</title>
     <body onLoad="loadit()">
          <h1 class="PageHeads">processing <img src="../progress_ani.gif" border="0"></h1>
     </body>
     </html>    

0
Comment
Question by:spop12
[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
3 Comments
 

Accepted Solution

by:
chriscaputo earned 100 total points
ID: 8019694
Your onLoad is being executed right away.  You actually want to do something like this:

<script>
// this will set the reload timer
window.setTimeout("document.location=result.asp?sOrder=10");

</script>

<body>
working blah blah blah
</body>

The problem with this is it is not preloading the second page while the timeout happens - which I think is what you believe is happening.  In fact, the query won't get run till results get run (unless somehow your pre-running it and maybe moving the results into a smaller table that you pull on results.asp)

The way I'd do this?  I'd have the page display the animated gif in a layer... flush that to the browser (response.flush), then have it run the query... push results to a hidden layer.. when that is all done hide the processing layer and show the hidden layer..  

If this solution is something you'd be interested in doing, let me know and I'll give more details.

Good luck,
Chris Caputo
0
 

Expert Comment

by:hansamryan
ID: 8072789
I would have to agree with Chris on this one.
0
 
LVL 2

Expert Comment

by:spauljoseph
ID: 8097567
Use this

'Main File
<Form Action="Progress.Asp" Method="POST">
Name : <Input Type=Text Name="txtName"><Br><Br>
<Input Type=Submit>
</Form>

'Progress.Asp
<%
  Session("txtName")=Request.Form("txtName")
%>
<Body OnLoad="Javascript:document.location='Query.Asp';">
<Img Src="yourgif.gif">

'Query.Asp
<%
  Dim con,rst
  Set con=Server.createObject("ADODB.Connection")
  Set rst=Server.CreateObject("ADODB.REcordSet")

  con.OPen  'Place open code here
  rst.Open "Select * from Table Where Name='" & Session("txtName") & "'"

  'Do the rest here
%>
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
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…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

777 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