Re: [webmin-devel] Making one web page replace another

Joe Cooper <[email protected]>
Newsgroups gmane.comp.web.webmin.devel
Message-ID <[email protected]>
Simplest method is a refresh tag:

<meta http-equiv="refresh" content="30">

Put an image of a ticking clock, or an animated throbber bar, on the 
page and folks will feel like something is still happening while your 
server is thinking.  You will, of course, need to make sure you sanely 
handle the situation where 30 seconds isn't long enough (and you may 
want to check sooner than 30 seconds, if it is possible for results to 
come sooner)...So you need a results CGI script that knows when you're 
finished with the SQL query and can server the throbber/refresh page 
until your query is finished and when it finishes serves the results.

There are ActiveX (evil!) and Java methods that allow you to do the same 
thing with actual interaction between the client and server, but they 
will not be compatible with all browsers and are probably much more 
trouble than the slight change in user experience.  Many very 
large/smart companies use the simpler method, and if it's good enough 
for them it's probably good enough for you and me.

Stephen Carville wrote:
> I have a cgi script that make a SQL call that can take 30 seconds or more to 
> complete.  My manager asked me to throw up a page with some cutsey graphic 
> indicating the request is being processed.  This intermediate page needs to 
> be replaced with the main page when it is ready.
> 
> I've been googling all day for an answer but no luck.  Anyone know how this is 
> done?
> 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
-
Forwarded by the Webmin development list at [email protected]
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.