RE: [PHP] Intermediate Searching... screen.
Well if you just wanted to do a simple redirect like the one you describe just use meta tags in the head/head meta HTTP-EQUIV=Refresh CONTENT=0;URL=searchPage.php If you use the method that Scott details (I would try to avoid that one though), create an HTML Searching... page with this meta tag. In the searchPage.php file have a redirect to another page after the search is completethis technique is REALLY useful if you have a page call a script that takes a long time to execute but doesn't really return anything to the page (ie send a bunch of e-mails, calculate averages and store in a db, etc). ed At 10:10 AM 5/29/2002 +1000, Scott Reismanis wrote: The way vbulliten does it, is they take a users search query, and find out which threads match i.e. (2000, 5000, 2310, etc...). This is then inserted into a database along with a search ID. From here once the search is completed you are forwarded to a page like search.php? search_id=7 that way urls are kept neat and everyone is happy. To return the search resultset a query like SELECT * FROM threads WHERE thread_id IN $result_set Unfortunatly there are extra overheads using this method, however for my site I had to mimic such a search otherwise my URLS got excessivly huge :) Anyhow that does not really answer the question as it does not explain how to create the 'searching' screen however I know it definatly involves a javascript redirect... I will explore that tonight and tell you what I find. Regards, Scott - Original Message - From SP [EMAIL PROTECTED] Date Tue, 28 May 2002 14:48:32 -0400 To Kevin Stone [EMAIL PROTECTED], Jeff Bearer [EMAIL PROTECTED], Php-General \(E-mail\) php- [EMAIL PROTECTED] Subject RE: [PHP] Intermediate Searching... screen. Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate Searching... screen. Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen does it initiate the search. The last line in that script would be a redirect back to your results page. Another way to do it would be to set up a couple of Javascript functions. Echo one to open the 'searching...' screen prior to initiating the search. Then at the end of the script echo the other javascript function to close the 'searching.. ' screen. But I've implimted a version of this for an upload script and it didn't work so hot. Er.. umm.. anyone got any other bright ideas? -Kevin - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 12:23 PM Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intermediate Searching... screen.
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(scriptdocument.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? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Intermediate Searching... screen.
Title: RE: [PHP] Intermediate Searching... screen. What you want to do is post the form, display a searching screen, and then on that same screen... well, like this, I think: form target=?= $PHP_SELF; ? input type=text name=foo input type=submit name=submit value=Submit /form ? if ($Submit) { echo Searching.br\n; go_go_gadget_query(); // above line takes a while but the aboev is already echoed so // they wait display_results(); } ? Regards, Ian Samuel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 1:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Intermediate Searching... screen.
You could, in theory, submit your query to an intermediate file, which only displays the Searching screen, but is querying your database and throwing everything you need into hidden fields in a form. Then have that form have an onLoad submit to your results page. I did this with HTML submitting to Perl submitting to PHP until we got the PHP/DB problems worked out. Here's what I wrote: print htmlhead/headbody onload=\document.HiddenForm.submit()\ ; print Page is loading, please wait; print form name=\HiddenForm\ method=\POST\ action=\../../joinpoint/joinpoint.withimage.php\; print $hiddenData; print /form/body/html; $hiddenData contained all of the values, in hidden data form, that I was sending to my action script. Good luck! There is probably an easier way than this, but if no one else comes up with it, at least you have something. -Natalie -Original Message- From: Jeff Bearer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 2:24 PM To: Php-General (E-mail) Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intermediate Searching... screen.
Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen does it initiate the search. The last line in that script would be a redirect back to your results page. Another way to do it would be to set up a couple of Javascript functions. Echo one to open the 'searching...' screen prior to initiating the search. Then at the end of the script echo the other javascript function to close the 'searching.. ' screen. But I've implimted a version of this for an upload script and it didn't work so hot. Er.. umm.. anyone got any other bright ideas? -Kevin - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 12:23 PM Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Intermediate Searching... screen.
Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate Searching... screen. Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen does it initiate the search. The last line in that script would be a redirect back to your results page. Another way to do it would be to set up a couple of Javascript functions. Echo one to open the 'searching...' screen prior to initiating the search. Then at the end of the script echo the other javascript function to close the 'searching.. ' screen. But I've implimted a version of this for an upload script and it didn't work so hot. Er.. umm.. anyone got any other bright ideas? -Kevin - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 12:23 PM Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Intermediate Searching... screen.
The way vbulliten does it, is they take a users search query, and find out which threads match i.e. (2000, 5000, 2310, etc...). This is then inserted into a database along with a search ID. From here once the search is completed you are forwarded to a page like search.php? search_id=7 that way urls are kept neat and everyone is happy. To return the search resultset a query like SELECT * FROM threads WHERE thread_id IN $result_set Unfortunatly there are extra overheads using this method, however for my site I had to mimic such a search otherwise my URLS got excessivly huge :) Anyhow that does not really answer the question as it does not explain how to create the 'searching' screen however I know it definatly involves a javascript redirect... I will explore that tonight and tell you what I find. Regards, Scott - Original Message - From SP [EMAIL PROTECTED] Date Tue, 28 May 2002 14:48:32 -0400 To Kevin Stone [EMAIL PROTECTED], Jeff Bearer [EMAIL PROTECTED], Php-General \(E-mail\) php- [EMAIL PROTECTED] Subject RE: [PHP] Intermediate Searching... screen. Vbulletin does this for their search. Anyone know how they do it? http://www.vbulletin.com/forum/search.php -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: May 28, 2002 2:36 PM To: Jeff Bearer; Php-General (E-mail) Subject: Re: [PHP] Intermediate Searching... screen. Search screens are a tricky prospect and none seem to work very well. However you could try one of the following techniques... Instead of the submit button initiating a search it initiates another script that displays the 'searching...' message and only after it has outputted that to the screen does it initiate the search. The last line in that script would be a redirect back to your results page. Another way to do it would be to set up a couple of Javascript functions. Echo one to open the 'searching...' screen prior to initiating the search. Then at the end of the script echo the other javascript function to close the 'searching.. ' screen. But I've implimted a version of this for an upload script and it didn't work so hot. Er.. umm.. anyone got any other bright ideas? -Kevin - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 12:23 PM Subject: [PHP] Intermediate Searching... screen. 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? -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php