With the old "command" way the button would be defined as:
<input type=submit name="command" value="Open">
The value Open would be shown as the label of the button and would map to a
method doOpen. But in another language the button would need a label that
has characters that may not be allowed in a method name. And then there are
times when you do not want a different command to be executed, but rather a
completely different action.
Of course with javascript you can work around everything but not everyone
likes javascript. Since the question has come up a number of times I thought
it would be good with one easy way to solve the problem.

Cheers,

Dick Zetterberg
[EMAIL PROTECTED]


----- Original Message -----
From: "Pat Lightbody" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2003 3:23 AM
Subject: Re: [OS-webwork] Forms with multiple submit buttons - suggestion


> How is the old "command" way bad for i18n? OK, maybe it's not as automatic
> as a button, but Javascript can get around that, right?
>
> -Pat
>
> ----- Original Message -----
> From: "Dick Zetterberg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 24, 2003 5:29 PM
> Subject: [OS-webwork] Forms with multiple submit buttons - suggestion
>
>
> > Hi,
> >
> > Every now and then somebody asks the list how to deal with forms where
> they
> > have multiple submit buttons. Depending on the clicked button one want
> > different commands executed or different actions.
> > The suggested solutions are usually to set the name of the button to
> > "command" and the value to the command to execute. This only works for
non
> > i18n cases, and does not work if you want different actions to execute.
> The
> > other easy way is to use client javascript to set the form action, but
> many
> > people do not like that either.
> >




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to