Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Form actions

Reply
Thread Tools

Form actions

 
 
Tony WONG
Guest
Posts: n/a
 
      09-20-2006
can i have 2 actions in a html form by 2 different submit buttons? Thanks a
lot.

tony


 
Reply With Quote
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      09-20-2006
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
 
 
 
 
tony wong
Guest
Posts: n/a
 
      09-20-2006
Travis

Thanks a lot.

tony


"Travis Newbury" <(E-Mail Removed)> 撰寫於郵件新聞: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
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      09-20-2006
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
 
Tony WONG
Guest
Posts: n/a
 
      09-21-2006
Chris

Your reply is of much assistance to me. Thanks.


"Chris F.A. Johnson" <(E-Mail Removed)> 撰寫於郵件新聞:(E-Mail Removed)...
> 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
 
richard
Guest
Posts: n/a
 
      09-21-2006

"Tony WONG" <(E-Mail Removed)> wrote in message
news:eer2qh$fmh$(E-Mail Removed)...
> 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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I perform some form actions on a seperate page? Peter Bremer ASP .Net 4 05-31-2007 04:03 PM
Two actions on a form elia Javascript 1 11-09-2006 11:24 AM
Need Help w/Multiple form submit actions Sophisticado Javascript 1 05-01-2005 04:15 PM
Two form actions Alex Vinokur HTML 2 01-14-2005 06:55 PM
------- HELP!!! MULTIPLE ACTIONS IN ONE FORM AND ONE SUBMIT BUTTON!!! Ice HTML 4 11-02-2003 10:13 AM



Advertisments