[Zope] site search

Rob Page rob.page@digicool.com
Fri, 10 Dec 1999 08:21:57 -0500


> I'm trying to implement a search feature on my site. Basically, I've
> created a form for searching with two radio buttons, one for 
> searching the
> Internet and the other for searching my site with ZCatalog. 
> Do I need to
> use any DTML trickery here or can I easily get the form to direct the
> action to different places based on which radio button is selected? I
> really hope this isn't some really obvious HTML question, but I hunted
> around and I can't find a good example or any easy answers. Thanks.

You can either send the form to the same ACTION and then break that
action up with something like:L

<dtml-if radio_button1>
..

or you can use some javascript.  Basically, change the submit button
from type=submit to type=button and make it run a javascript function.
You can then, at runtime modify the ACTION of the form and then send it
to the server.

HTH,
Rob