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

    Default multiple submit buttons on webpage

    Hey,

    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
    vac1.setRequestedNum(0);

    VacationDAO VacationDAO = new VacationDAO();


    VacationDAO.approve(vac1);




    response.sendRedirect("Approve.jsp");
    }
    else
    {

    }





    %>

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

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, 02:41 PM
  5. Submit Button Help
    By Jay-1.1 in forum New To Java
    Replies: 2
    Last Post: 05-06-2008, 05: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
  •