![]() |
|
|
|
#1 |
|
can i have 2 actions in a html form by 2 different submit buttons? Thanks a
lot. tony Tony WONG |
|
|
|
|
#2 |
|
Posts: n/a
|
Tony WONG wrote:
> can i have 2 actions in a html form by 2 different submit buttons? Thanks a > lot. Yes, and a simple google of "2 submit buttons on a form" resulted in a ton of sample code. |
|
|
|
#3 |
|
Posts: n/a
|
Travis
Thanks a lot. tony "Travis Newbury" <> ¼¶¼g©ó¶l¥ó·s»D:1158746035.298220.257310@h48g2000cw c.googlegroups.com... > Tony WONG wrote: >> can i have 2 actions in a html form by 2 different submit buttons? >> Thanks a >> lot. > > Yes, and a simple google of "2 submit buttons on a form" resulted in a > ton of sample code. > |
|
|
|
#4 |
|
Posts: n/a
|
On 2006-09-20, Tony WONG wrote:
> can i have 2 actions in a html form by 2 different submit buttons? Thanks a > lot. You can only have one action, but you can have more than one submit button. All buttons will use the sinlge action URL, but the script at that URL can do different things depending on which button was pressed. -- Chris F.A. Johnson <http://cfaj.freeshell.org> ================================================== ================= Author: Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) |
|
|
|
#5 |
|
Posts: n/a
|
Chris
Your reply is of much assistance to me. Thanks. "Chris F.A. Johnson" <> ¼¶¼g©ó¶l¥ó·s»D:gl38u3-... > On 2006-09-20, Tony WONG wrote: >> can i have 2 actions in a html form by 2 different submit buttons? >> Thanks a >> lot. > > You can only have one action, but you can have more than one submit > button. All buttons will use the sinlge action URL, but the script > at that URL can do different things depending on which button was > pressed. > > -- > Chris F.A. Johnson <http://cfaj.freeshell.org> > ================================================== ================= > Author: > Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) |
|
|
|
#6 |
|
Posts: n/a
|
"Tony WONG" <> wrote in message news:eer2qh$fmh$... > can i have 2 actions in a html form by 2 different submit buttons? Thanks > a lot. > > tony As is readily done on many sites for numerous reasons. Each button has a name, and hence, each action within the script refers to that name, defining what each button will do. Much like defining how each division will behave on a webpage with an ID or class name and corresponding styles. You might have 3 buttons and each button performs a different search. The real trick with multiple buttons, is what happens when the user presses enter instead. |
|