[Zope] Submit Button
Asad Habib
ahabib at engin.umich.edu
Thu Jul 1 09:47:09 EDT 2004
Hello. I tried using <button> elements instead of <input> elements but
they don't work for form submission. Do you have any idea why? I am using
IE 5.2 on Mac OS X Panther and the following is my code:
<button type="submit" name="edit_data" value="Save Changes">Save Changes</button>
edit_data is the name of a DTML method and is the action of the form.
However, when I click on this button I get a 'Key Error' informing me that
edit_data is a nonexistent object or variable. If I use an
<input> element instead, everything works fine. Input elements do not
achieve what I want though.
Any help would be greatly appreciated. Thanks.
- Asad
On Wed, 30 Jun 2004, Passin, Tom wrote:
> > From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On
>
> > Does anyone know if there is a way to have a button with a
> > label that differs from the value of the button. I am using
> > several buttons in a form that have the same name since they
> > call the same DTML method. I would like to give these buttons
> > the same label without giving them the same value.
> > If the values are all the same, there is no way for me to
> > detect which button was clicked. Any help would be greatly
> > appreciated. Thanks.
>
> In order of (my) preference -
>
> 1) Don't tie the button label to the method called. Then you can have
> different buttons call the same method.
>
> 2) Use <button> elements rather than <input> elements. Button elements
> display their text content as the label.
>
> Cheers,
>
> Tom P
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
More information about the Zope
mailing list