From: Joe C. <jo...@sw...> - 2005-04-12 02:11:45
|
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? > |