Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2010
    Rep Power

    Default multiple submit buttons on webpage


    Need some urgent help!

    The following is my code i.e. the action i want performed once the 'Approve' submit button is selected. Problem is i have multiple buttons and cant figure out how to get the bottom code to run once the 'Approve' button is selected?

    <input type="submit" id="x" name="Approve" value="Approve" /></form>

    <input type="submit" id="x" name="Reject" value="Reject" />


    String APPROVEDSD = request.getParameter(date1);
    String APPROVEDED = request.getParameter(dates1);

    if((APPROVEDSD != null) && (APPROVEDED != null))

    Vacation vac1 = new Vacation();

    vac1.setApprovedSD(date1); //date1=date in optionbox in webpage
    vac1.setApprovedED(dates1); //dates1=date in optionbox in webpage

    VacationDAO VacationDAO = new VacationDAO();





  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. One controller with multiple buttons and colors
    By Cutter in forum New To Java
    Replies: 5
    Last Post: 01-24-2010, 07:47 PM
  2. Submit values to a parent page
    By carag in forum New To Java
    Replies: 1
    Last Post: 12-11-2009, 01:33 AM
  3. invoking servlet from jsp form submit using web.xml
    By java_hyd in forum Java Servlet
    Replies: 1
    Last Post: 11-24-2009, 09:57 PM
  4. How to use one form to submit data to 2 tables on mysql
    By kwesiaryee in forum New To Java
    Replies: 2
    Last Post: 10-10-2008, 01:41 PM
  5. Submit Button Help
    By Jay-1.1 in forum New To Java
    Replies: 2
    Last Post: 05-06-2008, 04:28 PM

Posting Permissions

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