Form actions

T

Tony WONG

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

tony
 
T

Travis Newbury

Tony said:
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.
 
C

Chris F.A. Johnson

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

richard

Tony WONG said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top