Re: [greenstone-users] How to create a search from using <select>?

From Stephen DeGabrielle
DateTue, 15 Mar 2005 23:31:25 +0930
Subject Re: [greenstone-users] How to create a search from using <select>?
In-Reply-To (p06100509be5bed61639c-172-16-2-50)
Hi John,

Caveat - I haven't actually done this with Greenstone - but I have
done it a lot with other systems.

You need to make a custom 'macro' file for your collection, or you
could customise the existing macro files.

To do what you are suggesting you need to select (in the GLI) advanced
searching and
'form' based searching - when you rebuild the collection it will be
able to search across multiple metadata 'fields'.

After that you can view source on the search page to see how
greenstone constructs searches -
Once you get a handle on how greenstone constructs search for you
specific collection you can embed any custom form elements you like
into a custom macro document for the collection - includion dropdown
lists, radio buttons and checkboxes.

Note: the 'Garish' demo collection is a good intro into custom macro files.

You may also want to investigate 'partition indexes' in the
GLI/Developers Guide, as this may also be of interest.

Sorry I have not been able to give you a more detailed answer - its
late and I am going to bed soon.

Do let me(and the list) know if you need more information/help or if I
haven't been clear enough to get you started.

Regards,

Stephen

On Mon, 14 Mar 2005 18:07:32 -0800, John Lubotsky <john&#64;johnlubotsky.com> wrote:
>
> I'm a Greenstone newbie, designing a collection on OS X using v 2.52.
>
>
> We want to enable users to choose a search string from a pulldown menu (a
> <SELECT> tag), drawing the <OPTION> values ideally from a metadata field, or
> else staticly embedded in the code.
> Some example HTML to illustrate the idea is below. In the below example, the
> text input would search ex.Title, and the option values would come from
> foo.Continent.
>
>
> Search for documents containing the words
> <input type=text size=25> that pertain to
> <select name=continent>
> <option value=north_america>North America
> <option value=south_america>South America
> <option value=africa>Africa
> <option value=europe>Europe
> <option value=asia>Asia
> <option value=australia>Australia
> </select>
>
> I've searched the documentation but i'm stumped. Is this possible? How do we
> do it?
>
>
> Thanks and Best,
> John Lubotsky
>
> PS: I'm also interested in more generally being able to use checkboxes,
> radio buttons, and other form elements. -j-
> _______________________________________________