Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ONE FORM-- 2 buttons and 2 Actions???

    Hi All..
    I have a form with lot of fields and 2 buttons

    One is a SUBMIT button and this follows the ACTION.Meaning when i click on SUBMIT it goes to servlet defined in the ACTION=

    Now My requirement is that the SEARCH button which is besides the 1st Field on my Form. has a different servlet/different functionality other than the SUBMIT.

    How do i define two seperate ACTIONS..on two seperate buttons on my form.

    I have seen a submit and search in many forms .How do we do it.

    THANKS
    VIJ
    vijay...life is awesome!

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    <input type="submit" name="btnSubmit" value="Submit" onclick="this.form.action='submitActionServlet'">

    <input type="submit" name="btnSearch" value="Search" onclick="this.form.action='searchActionServlet'">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •