[thelist] <select> and defaulting to "All"

David Crowther david at SITD.COM
Fri Aug 4 05:20:34 CDT 2000

I am providing a compound search option in a site that I am coding in
ColdFusion. The two search choices are by County and Category.
I want to set the default option to "All" (all the counties) in the County

For example:

<select name="County"
		<option value="*" selected>All</option>
		<option value="Aberdeenshire">Aberdeenshire</option>
		<option value="Anglesey">Anglesey</option>
		<option value="Angus">Angus</option>
		<option value="Antrim">Antrim</option>... etc

And my query code:

<cfquery name="getSearchResults" datasource="#application.database#"
		FROM ((tblCustomer inner join tblCustomerDetails on
tblCustomer.CustomerID = tblCustomerDetails.CustomerID)
		inner join tblCategories on tblCustomer.CategoryID =
		WHERE County = '#form.County#'
		AND tblCustomer.CategoryID = #form.CategoryID#
		ORDER BY CompanyName

As you can see I have tried using a * as the first option in my <select>
tag, but unfortunately this does not work.

Does anyone have an idea how I can get this to work... many thanks in


<tip type="Photoshop 5.5">
Don't forget in Photoshop 5.5 to tick the "Only Web Colors" box in the Color
Picker when you want to make sure your web site is web safe.

More information about the thelist mailing list