[Zope] smart buttons
Rob Page
rob.page@digicool.com
Wed, 24 Feb 1999 12:06:43 -0500
> Is there any nice automated way in Zope to make a form with
> multiple submit
> buttons each calling a different document?
The FORM's ACTION determines where all INPUT TYPE="SUBMIT" buttons send
the form. Alternatively, you may try adding a little JavaScript and
changing the button to:
<INPUT TYPE="BUTTON" VALUE=" Go! " onClick="somefunction(this.form)">
in the JavaScript function: somefunction(form) you can change the ACTION
property of the form based on which button was clicked. Not beatiful
but it works...
> Currently I have hacked around this by calling a single
> document containing a
> deeply-nested conditional and some <!--#var "_['foo']"-->
> includes but this is
> giving me obscure errors and anyway is messy.
Which way is messier? :^)
--Rob