| 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"
|