
Combo box with description
A combo box that also displays a short description of the selected link in a form box.
Simply add the below where you want ...(Copy & Paste):
<html>
<head>
<title>Combo box with description</title>
</head>
<body>
<center>
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.cnet.com">Cnet</option>
<option value="http://www.cnn.com">CNN</option>
<option value="http://www.geocities.com">Geocities</option>
</select>
<input type="button" value="Go!"
onClick="gothere()"><br>
<textarea rows=5 cols=21 wrap="virtual" name="text"></textarea>
<script language="javascript">
<!--
/*
Combo box with description credit-
By Jumbo Education (www.jumboeducation.com)
*/
var shortcut=document.combowithtext
var descriptions=new Array()
//extend this list if neccessary to accomodate more selections
descriptions[0]="Click here for Cnet, the primer technology site on the net!"
descriptions[1]="Click here for CNN, one of the best sources online to get your news."
descriptions[2]="Click here for Geocities, and receive 10 megs of free web space."
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
function gothere(){
location=shortcut.example.options[shortcut.example.selectedIndex].value
}
function showtext(){
shortcut.text.value=descriptions[shortcut.example.selectedIndex]
}
//-->
</script>
</form>
</center>
<p align="center"><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="">Jumbo Education</a></font></p>
</body>
</html>
Others

