On Mon, 2 Apr 2001 [EMAIL PROTECTED] wrote:

> I need to run some stored procedures that take upwards of a minute to generate 
> result sets. Ok, thats grand but I dont want the browser to sit there and 
> twiddle.
> 
> I'd like to display an animated gif. Simple. Right? I hope.

Why can't you just display your animated gif on a page with a refresh tag
that loads the real page with the query in it.  A refresh meta tag doesn't
have to reload the same page again, you can redirect it to another URL.  
Your gif would be displayed, and you query would start right away.  

You have to make sure that you don't send out any data from your query
script until you are ready to display the entire thing.  The browser will
not clear the screen until it receives some data from the server.

The only other issue here is browser timeouts.  If the page takes too long
to display, the browser may drop the connection, but I've found that if a
browser makes a connection, it will wait for a 'long' time for data to
show up.  I don't have any numbers, but it would be trivial to test.

This method is great to stop people from hitting a link repeatedly if a
page doesn't load right away.

I've included a simple HTML page that we use to generate some reports that
take up to 30 seconds to display

Cees Hek


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=reports.cgi?sessionid=?????">
</head>
 
<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"
bgcolor="#FFFFFF">
 
<table width="100%" height="100%" border="0" cellspacing="0"
cellpadding="0" bgcolor="#FFFFFF" align=center>
 <tr>
  <td align="center" valign="center">
   <font face="verdana,arial,helvetica" size=4 color=red>
   Please wait while creating reports...</font>
  </td>
 </tr>
</table>
</body>
</html>

Reply via email to