multiple drop downs

W

wmarshall

I am trying to create a web page that has mutiple drop
downs. each selection in each drop down should link to
somehting else. here is the code i am trying out.
everytime i add a drop down it links to the last case#.
how do i define the differnce between each drop down
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>New Page 2</title>
</head>

<body>
<h3 align="left">CSS Information</h3>
<center>
<form>
<p>
<h3 align="left"><select name="css_info" size="1"
language="javascript" onChange="gotoPage
(this.selectedIndex);">
<option selected>Please select one of the
options.</option>
<option>- - - - - - - - - - - - - - - - -</option>
<option>Microsoft Home Page</option>
<option>MSN Home Page</option>
</select></h3>
</p>
</form>
</center>
<script language="JavaScript">
<!--
function gotoPage(varItem)
{
switch(varItem)
{
case 0:
window.parent.self.status="Goes Nowhere";
break;
case 1:
window.parent.self.status="Goes Nowhere";
break;
case 2:
window.location="http://www.microsoft.com";
break;
case 3:
window.location="http://www.msn.com";
break;
}
}
// -->
</script>

</body>

</html>
<html>
 
S

someone

Try this:
<Script Language="JavaScript">
<!-- Hide the script from old browsers --
function goto(form) {
var index=form.View.selectedIndex
if (form.View.options[index].value != "0") {
location=form.View.options[index].value;}}
//-->
</SCRIPT>
<form>
<select name="css_info" size="1" language="javascript"
onChange="goto(this.form)">
<option value="" selected>Please select one of the
options.</option>
<option value=""> - - - - - - - - - - - - - - -</option>
<option value="http://www.microsoft.com">Microsoft Home
Page</option>
<option value="http://www.msn.com">MSN Home Page</option>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top