Hi, so i'm trying to develop a combo box where if the user selects one option, it will show a list of options and if the user selects a different option all of the options change. And when the page loads the page is empty except for the one combo box, and more pop up as it goes along. Here is my current code that i've got, and it works for one way, but i need it two+ ways.
Code:
Code for Drop down menu show more options (only working for 1 option currently)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
<script type="text/javascript">
<!--
function officeSelect() {
var other = document.getElementById("officeShow");
if (document.forms[0].theItems.options[document.forms[0].theItems.selectedIndex].value == "office") {
other.style.visibility = "visible";
}
else {
other.style.visibility = "hidden";
}
}
//-->
</script>
</head>
<body>
<form action="" method="">
<select name="theItems" onchange="officeSelect()">
<option value="-1">Select...</option>
<option value="home">Home</option>
<option value="office">Office</option>
</select>
<div style
<div id="officeShow" style="visibility: hidden;">
Office Stuff: <input name="officeField" type="text" />
</div>
</form>
</body>
</html>
Thanks to any one who can help me