This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > November 2006 > Narrowing down a search facility?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Narrowing down a search facility?
T.J.

2006-11-19, 7:58 pm

I'm working on a search facility where people can
Search by Category
Search by County
Search by Category and County

The problem I have is that I have far to many categories
that are not in all the counties, which leads to negative results
much too often.

example here
http://www.uksmallbusinessdirectory.co.uk/search.asp
(the bottom search)

Is there a simply way of having it so that if
someone selects a category only the counties which
have that category are displayed in the next box
before they search?

Working in ASP with Access database.

TIA.


Mark Goodge

2006-11-19, 7:58 pm

On Wed, 15 Nov 2006 15:04:28 -0000, T.J. put finger to keyboard and
typed:

>I'm working on a search facility where people can
>Search by Category
>Search by County
>Search by Category and County
>
>The problem I have is that I have far to many categories
>that are not in all the counties, which leads to negative results
>much too often.
>
>example here
>http://www.uksmallbusinessdirectory.co.uk/search.asp
>(the bottom search)
>
>Is there a simply way of having it so that if
>someone selects a category only the counties which
>have that category are displayed in the next box
>before they search?


That's tailor-made for an AJAX solution, and it's the sort of
situation where client-side scripting is perfectly acceptable so long
as it's merely a helper rather than being key to the functionality.

To go into a bit more deatil on that, what you need is a Javascript
function which responds to an onChange on the first form element
(category) and passes the category value to a page fragment (generated
in ASP) which looks up the valid counties for that category and then
displays it to the screen by means of a document.write.

I don't have any code snippets that will do this, but Google should
provide plenty of off-the-shelf scripts.

Mark
--
Visit: http://www.MotorwayServices.info - read and share comments and opinons
"You surround me like a winter fog, you've come and burned me with a kiss"
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews