...

View Full Version : Form Drop Down Link to page?



Vapor
05-25-2005, 10:31 PM
In this example, How can I make the form work so that when you choose the drop down list that the link that you choose will take you to pagea.html or pageb.html?

<form>
<select name="NAME">
<option>Page A
<option>Page B
</select>
</form>

_Aerospace_Eng_
05-25-2005, 10:44 PM
<!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>Untitled Document</title>
<script type="text/javascript">
<!--
function change(url){
if(url=="none"){
return false;
}
else {
window.location=url;
}
}
//-->
</script>
</head>

<body>
<select onchange="change(this.value)" name="blah">
<option value="none">Select a Page</option>
<option value="http://www.codingforums.com">Coding Forums</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo</option>
</select>
</body>
</html>

Vapor
05-26-2005, 12:31 AM
Dude! Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum