[hunchentoot-devel] How do I read the submit button value?
Tab Atkins Jr.
jackalmage at gmail.com
Sat Oct 16 16:32:44 UTC 2010
On Sat, Oct 16, 2010 at 9:13 AM, Andrea Chiumenti <kiuma72 at gmail.com> wrote:
> Matt,
> don't use <input type='submit'
>
> it's old java Struts 1.2 style, bleah.. and typical of old MVC action
> based frameworks.
>
> use <button> intead.
This makes no sense. <input type=submit value=foo> is identical to
<button type=submit>foo</button> in terms of submission behavior.
It's also usually identical in default appearance. There's not
intended to be any difference between them. There is certainly no
difference in terms of style or framework.
The OP's problem is that an input needs a 'name' attribute to be
included in the submitted data. A submit button without a 'name'
attribute will still submit the form, but won't place its value in the
data, so you can't tell which button was used to submit it.
~TJ
More information about the Tbnl-devel
mailing list