Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How do i make a HTML form redirect to different pages based on responses to a form?
I have a HTML form with two drop down boxes with the options 'Yes' and 'No' in each. When submitted, i want the form to direct the user to one page if both responses are yes, and another page if either response is no. Can anyone give me some very simple guidelines on how to do this, or where i could find a nice tutorial about it?
4 Answers
- 1 decade agoFavorite Answer
check out these HTML tutorial videos .. with they r helpful :)
- ?Lv 45 years ago
Uh, it incredibly is an horrific lot of programming for absolutely everyone to respond to it merely right here. First, you are able to desire to earnings how HTML varieties artwork. then you definately would desire to earnings how Hypertext Preprocessor can settle for and manage documents submitted via an HTML type.
- Chris CLv 71 decade ago
Use Javascript.
<html>
<script type="text/javascript">
function switchit()
{
var frm = document.forms[0];
if (frm)
{
if ((frm.myfield1.value = "no") || (frm.myfield3.value = "no"))
return 0;
else
{
// change the action for the form to a different web page and submit it
frm.action="someotherpage.php";
frm.submit();
}
}
}
</script>
<body>
<form action="switchit();" type="post">
<select name="myfield1">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<input type="text" name="myfield2">
<select name="myfield3">
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
</form>
</body>
</html>
- Anonymous1 decade ago
You can use Javascript window or php header(location: