[hunchentoot-devel] How do I read the submit button value?

Andrea Chiumenti kiuma72 at gmail.com
Sat Oct 16 16:43:46 UTC 2010


before saying to someone that he says nonsense!!!!

I'll give you this example, without comments. Make your conclusions!

<html>
  <head>
    <title>Think before</title>
  </head>
  <body>
    <form action="#" method="get">
      <button name="submit" value="action1" type="submit">esegui
operazione</button>
      <button name="submit" value="action2" type="submit">cancella
tutti i dati</button>
    </form>
  </body>
</html>

kiuma
2010/10/16 Tab Atkins Jr. <jackalmage at gmail.com>:
> 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
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel




More information about the Tbnl-devel mailing list