Re: Intermediate "Searching..." screen.
| From: | Mike Gohlke | Date: | Wed, 29 May 2002 14:43:16 +0000 |
| Subject: | Re: Intermediate "Searching..." screen. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99748@lists.php.net to get a copy of this message | ||
As stated elsewhere, this is somewhat similar to what you need.
(btw, NOT tested for syntax errors)
<?
// $searchquery = their incoming request
// $finishedquery = an already stored request
// I use this style (inserting pointers to the searched records into a table for temporary use. It's a halfassed form of caching)
//
if ( empty($finishedquery) ) {
echo("Searching...");
dosearch($searchquery);
echo("<script>document.location='$PHP_SELF?finishedquery=$searchquery;</script>");
} else {
showsearch($finishedquery);
}
?>
Jeff Bearer wrote:
I have a part of my site that searches a large database and sometimes it takes more than a few seconds to return the results. When searches take longer, people get antsy and search again. To let them know that the search is working so they don't double efforts I'd like to have an intermediate "Searching..." screen. I don't have a good idea on how to do this and I'm looking for some ideas or directions. How do I show one thing while the search is running and another when the search is complete and also not loose the returned record set?