Results 1 to 2 of 2
- 03-04-2010, 01:16 AM #1
Member
- Join Date
- Feb 2010
- Posts
- 5
- Rep Power
- 0
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
{
}
%>
-
Similar Threads
-
One controller with multiple buttons and colors
By Cutter in forum New To JavaReplies: 5Last Post: 01-24-2010, 06:47 PM -
Submit values to a parent page
By carag in forum New To JavaReplies: 1Last Post: 12-11-2009, 12:33 AM -
invoking servlet from jsp form submit using web.xml
By java_hyd in forum Java ServletReplies: 1Last Post: 11-24-2009, 08:57 PM -
How to use one form to submit data to 2 tables on mysql
By kwesiaryee in forum New To JavaReplies: 2Last Post: 10-10-2008, 01:41 PM -
Submit Button Help
By Jay-1.1 in forum New To JavaReplies: 2Last Post: 05-06-2008, 04:28 PM
Bookmarks