Form actions

Discussion in 'HTML' started by Tony WONG, Sep 20, 2006.

  1. Tony WONG

    Tony WONG Guest

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

    tony
     
    Tony WONG, Sep 20, 2006
    #1
    1. Advertising

  2. 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.
     
    Travis Newbury, Sep 20, 2006
    #2
    1. Advertising

  3. Tony WONG

    tony wong Guest

    Travis

    Thanks a lot.

    tony


    "Travis Newbury" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > 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.
    >
     
    tony wong, Sep 20, 2006
    #3
  4. 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)
     
    Chris F.A. Johnson, Sep 20, 2006
    #4
  5. Tony WONG

    Tony WONG Guest

    Chris

    Your reply is of much assistance to me. Thanks.


    "Chris F.A. Johnson" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > 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)
     
    Tony WONG, Sep 21, 2006
    #5
  6. Tony WONG

    richard Guest

    "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.
     
    richard, Sep 21, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ice
    Replies:
    4
    Views:
    6,242
    David Dorward
    Nov 2, 2003
  2. Alex Vinokur

    Two form actions

    Alex Vinokur, Jan 14, 2005, in forum: HTML
    Replies:
    2
    Views:
    427
    Alex Vinokur
    Jan 14, 2005
  3. Peter Bremer
    Replies:
    4
    Views:
    360
  4. Sophisticado

    Need Help w/Multiple form submit actions

    Sophisticado, May 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    141
    David Dorward
    May 1, 2005
  5. elia

    Two actions on a form

    elia, Nov 9, 2006, in forum: Javascript
    Replies:
    1
    Views:
    107
    Michael Winter
    Nov 9, 2006
Loading...

Share This Page