Hi All,
I have following Jsp page:My requirement is: Page has a single submit button and two <FORM> tags. Each form tag has a Url to invoke on Submit button pressed. Meaning if user selects SIT1 radio button and presses Submit then the browser should display indexBM.jsp page If user selects SIT2 radio button and presses Submit, then browser should display indexComp.jsp page.Following is not working. What changes I need to do to achieve above?
I can use only one Submit button for both the forms.
So, the user interface series is
1>Page gets displayed
2>User selects the Radio button, either SIT1 or SIT2 and then presses the Submit
3>On Submit the either indexBM.jsp or indexComp.jsp is displayed depending upon which radio button user selected.
What changes I need to do in Jsp page to achieve this series of events? Pl remember I have only one Submit button and two Radio buttons for selection
thanks
<%@ include file="header.jsp" %>
<script>
checkSubmit()
{
}
</script>
request.getParameter("radio").equals("SIT1") action="indexBM.jsp"
<html>
<body>
<tr><td><b><center>BEST MATCH and CRES(Customer Related Enterprise Services)</td></tr>
<form method="post" action="indexBM.jsp">
<table width="700" Align="center">
<!--DWLayoutTable-->
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td></td>
<td><B><I>Service Type</I></B></td>
<td><input type="radio" name="env_Type" value="SIT1" >Best Match</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<input type="submit" name="submit" onclick="return checkSubmit()">
</table>
</form>
<form method="post" action="indexComp.jsp">
<table width="700" Align="center">
<tr>
<td></td>
<td></td>
<td><input type="radio" name="env_Type" value="SIT2" >CRES(Customer Related Enterprise Services)</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</form>
<tr>
<BR>
<P></P>
</tr>
<tr>
<td width="40"></td>
<td></td>
<td colspan=3>
<input type="submit" name="submit" value="SUBMIT">
</td>
<td></td>
</tr>
</table>
</body>
</html>