
how to write code in HTML & jsp, when we click on radio buttons the corresponding jsp page should open..!

<html>
<script>
function openPage(){
var selection = document.form.radios;
for (i=0; i<selection.length; i++)
if (selection[i].checked == true)
if(selection[i].value=="view"){
window.location.replace("view.jsp");
}
else if(selection[i].value=="edit"){
window.location.replace("edit.jsp");
}
else if(selection[i].value=="delete"){
window.location.replace("delete.jsp");
}
}
</script>
<form name="form">
View Profile<input type="radio" value="view" name="radios" onclick="openPage();"><br>
Edit Profile<input type="radio" value="edit" name="radios" onclick="openPage();"><br>
Delete Profile<input type="radio" value="delete" name="radios" onclick="openPage();">
</form>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.