Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Form actions

 
Thread Tools Search this Thread
Old 09-20-2006, 10:49 AM   #1
Default Form actions


can i have 2 actions in a html form by 2 different submit buttons? Thanks a
lot.

tony




Tony WONG
  Reply With Quote
Old 09-20-2006, 10:53 AM   #2
Travis Newbury
 
Posts: n/a
Default Re: Form actions

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.

  Reply With Quote
Old 09-20-2006, 11:43 AM   #3
tony wong
 
Posts: n/a
Default Re: Form actions

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.
>



  Reply With Quote
Old 09-20-2006, 04:34 PM   #4
Chris F.A. Johnson
 
Posts: n/a
Default Re: Form actions

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)
  Reply With Quote
Old 09-21-2006, 02:39 AM   #5
Tony WONG
 
Posts: n/a
Default Re: Form actions

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)



  Reply With Quote
Old 09-21-2006, 05:09 AM   #6
richard
 
Posts: n/a
Default Re: Form actions


"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.

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump