<script language="javascript">
function setOptions(chosen)
{
var selbox = document.miformu.opttwo;
selbox.options.length = 0;
if (chosen == " ")
{
selbox.options[selbox.options.length] = new Option('Please select one of the options above first',' ');
}
if (chosen == "1")
{
selbox.options[selbox.options.length] = new Option('first choice - option one','oneone');
selbox.options[selbox.options.length] = new Option('first choice - option two','onetwo');
}
if (chosen == "2")
{
selbox.options[selbox.options.length] = new Option('second choice - option one','twoone');
selbox.options[selbox.options.length] = new Option('second choice - option two','twotwo');
}
if (chosen == "3")
{
selbox.options[selbox.options.length] = new Option('third choice - option one','threeone');
selbox.options[selbox.options.length] = new Option('third choice - option two','threetwo');
}
}
</script>
<form name="miformu">
<div align="center">
<select name="optone" size="1" onchange="setOptions(document.miformu.optone.options[document.miformu.optone.selectedIndex].value);">
<option value=" " selected="selected"> </option>
<option value="1">First Choice</option>
<option value="2">Second Choice</option>
<option value="3">Third Choice</option>
</select>
<br><br>
<select name="opttwo" size="1">
<option value=" " selected="selected">Please select one of the options above first</option>
</select>
<input type="button" name="go" value="Value Selected" onclick="alert(document.miformu.opttwo.options[document.miformu.opttwo.selectedIndex].value);">
</div>
</form>
lunes, 10 de septiembre de 2007
Suscribirse a:
Enviar comentarios (Atom)
Archivo del blog
-
►
2014
(13)
- ► septiembre (2)
-
▼
2007
(44)
- ▼ septiembre (7)
2 comentarios:
Es increible como internet ha ayudado a la divulgacion de estos temas. cotizacion dolar
bad credit loans for unemployed
Muy buen articulo, estoy casi 100% de acuerdo contigo :)
Publicar un comentario