Re: [htdig] Using a Drop Down Option Box


Subject: Re: [htdig] Using a Drop Down Option Box
From: Brett Baugh (brett.baugh@cyberplex.com)
Date: Tue Mar 14 2000 - 15:06:30 PST


"Simon Hyde - Webyte.co.uk" wrote:

> Hi, I am using htdig in a directory of businesses that I am
> creating, is it possible to remove all the other options from the
> search form and just have a drop down list of business types, so for
> example the end user would select plumber from the drop down list
> and then click search, and would then be presented with a list of
> plumbers ?? Thanks, Simon Hyde.

Just put a list of all the things you want in a select box called
"words"..... e.g.:

<select name="words" onChange="submit()">
<option value="plumber">Plumbers</option>
<option value="carpenter">Carpenters</option>
<option value="zookeeper">Zoo Keepers</option>
</select>

Also, you'll need hidden fields for the things you would have put on
the form but didn't; e.g.,

<input type=hidden name="method" value="and">
<input type=hidden name="format" value="builtin-short">
<input type=hidden name="config" value="businesses">
<input type=hidden name="exclude" value="">

etc, etc, etc, etc. (That "onChange" thing is just a scrap of
javascript that submits the form soon as they change that box; leave
it out if you want....)

_________________________
Brett Baugh
System Administrator/Unix Programmer
Cyberplex Interactive Media
http://austin.cyberplex.com
512.795.3050
"We have no intention of shipping another bloated OS and shoving it
down the throats of our users."
-- Paul Maritz, Microsoft group vice president



This archive was generated by hypermail 2b28 : Tue Mar 14 2000 - 15:11:44 PST