I want to Select a JSP Page from total 9 JSP page by Selecting that option using Radio Button & Redirect Selected button after Pressing Submit Button.........


Help Me Out...
I am sending my code with this post...which is as Follows...

Thanks
Jugal




<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
</head>
<body>


<hr />
<br />
<strong>Select Option From Follownig to Procced</strong>
<br />
<br />
<strong>Student</strong>
<br />
<br />
<form id="selectform" name="selectform" method="post" >
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="addnewstu" id="addnewstu" />
Add a New Student</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="selseastu" id="selseastu" />
Search Studnet</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="genstudent" id="genstudent" />
Generate Student Report</label>
<br />


<br />
<strong>Faculty</strong>
<br />
<br />

&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="addnewfac" id="addnewfac" />
Add a New Faculty</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="selseafac" id="selseafac" />
Search Faculty Profile</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="genfaculty" id="genfaculty" />
Generate Faculty Report</label>
<br />


<br />
<strong>Support Staff</strong>
<br />
<br />

&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="addnewsupport" id="addnewsupport" />
Add a New Support Staff</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="selseasupport" id="selseasupport" />
Search Support Staff Profile</label>
<br />
&nbsp;&nbsp;&nbsp;&nbsp;
<label>
<input type="radio" name="select" value="gensupport" id="gensupport" />
Generate Support Staff Report</label>
<br />

<br />

<input name="Sumbit" type="submit" value="Submit" onclick="redirect" />
</form>
<br />
<br />

<hr />

</body>
<script type="text/javascript">
function redirect()
{
var selection = document.selectform.select;

for (i=0; i<selection.length; i++)

if (selection[i].checked == true)
if(selection[i].value=="addnewstu")
{
window.location.replace("addstudent.jsp");
}
else if(selection[i].value=="selseastu")
{
window.location.replace("");
}
else if(selection[i].value=="genstudent")
{
window.location.replace("");
}
else if(selection[i].value=="addnewfac")
{
window.location.replace("addfaculty.jsp");
}
else if(selection[i].value=="selseafac")
{
window.location.replace("");
}
else if(selection[i].value=="genfaculty")
{
window.location.replace("");
}
else if(selection[i].value=="addnewsupport")
{
window.location.replace("addsupport.jsp");
}
else if(selection[i].value=="selseasupport")
{
window.location.replace("");
}
else if(selection[i].value=="gensupport")
{
window.location.replace("");
}


}
</script>
</html>