You could have (and I assume you already have) an id for each customer_name-DIV . This id should correspond to the customer id in your DB. You can then send out an AJAX request with the search term and have it return a list of the ids of the customer-DIV's to expand. A similar solution is to send back a list of names to expand, and then have Javascript go through the whole listing to find those names. Simcha Younger -----Original Message----- From: Dan Shirah [mailto:mrsquash2@xxxxxxxxx] Sent: Tuesday, August 26, 2008 3:31 PM To: PHP-General List Subject: Search Suggestions Hello, I'm hoping to get a few good ideas on the best way to perform a search of PHP results. Currently I have a page that returns a list of collapsed customer data: Example + John Smith + Jane Doe + Robert Jones + Dale Bennett If the user clicks on a customer name it will expand the selection: Example - John Smith - 123 Anywhere Street - myCity - myState - myZipcode - myWebsite + Jane Doe + Robert Jones + Dale Bennett Now, what my client wants is a Search functionality that will allow him to type in myState and have the application automatically expand and focus on the first match. Then, be able to click "Next" and have it collapse the first result and expand the next result that contains the same state. Any ideas? I was thinking that maybe I would have to create a temp table so it could be searched against, but I'm not sure if that is the best idea. Also, in order to save processing time, the way I made the above expanding/collapsing list is I don't not pull in the customer details intially but instead run a query and get the details when the name is clicked for expansion. This is because there could be potentially 1,000's of result and getting all of the names and all of the details at page load would 1) take longer than a user is willing to wait 2) exceed the timeout 3) exceed the memory allocation Thanks for any help/ideas. Dan No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.6.7/1632 - Release Date: 25/08/2008 07:05 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php