[Zope] Image Submit Buttons
Andreas Mutschlechner
amutsch@abaid.com
Thu, 13 Apr 2000 21:50:01 +0000 (GMT)
hello
use this as html
<form action="edit" method="post">
<input type="image" src="..." name="add">
<input type="image" src="..." name="delete">
</form>
in zope the variables are called add.x (or add.y) and delete.x
depending which image you push.
greetings
andreas
On Thu, 13 Apr 2000, Weston Bustraan wrote:
> I have a form where, instead of "Add" and "Delete" buttons, I want to use
> images of a plus and a minus sign. If I use images, Zope seems to ignore
> the names and values of buttons.
>
> For example:
>
> I have something that looks like this:
>
> Form Html:
> <form action="edit" method="post">
> <input type="submit" name="mode" value="Add">
> <input type="submit" name="mode" value="Delet">
> </form>
>
> DTML Method "edit":
> <dtml-if "mode == 'Add'">
> ....
> <dtml-elseif "mode == 'Delete'">
> ....
> </dtml-if>
>
> Works great, but if I change the form to:
>
> <form action="edit" method="post">
> <input type="image" src="..." name="mode" value="Add">
> <input type="image" src="..." name="mode" value="Delet">
> </form>
>
> Zope responds:
> "Zope Error
> Zope has encountered an error while publishing this resource.
> Error Type: NameError
> Error Value: mode"
>
> Anybody have any suggestions?
>
> ,------------------------------------------------------------,
> | Weston J. Bustraan | E-Mail: weston@itdonline.net |
> | Development Manager | Phone: (616)249-3630 |
> | Infinity Tel-Data Inc. | Fax: (616)249-3067 |
> | 4723 S. Division Ave. | WWW: www.itdonline.net |
> | Wyoming, MI 49548 | PGP: finger weston@itdonline.net |
> `------------------------------------------------------------`
>
> A)bort, R)etry, I)nfluence with large hammer.
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>