Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/11/2003, 13:09
Avatar de dieguicho
dieguicho
 
Fecha de Ingreso: noviembre-2001
Ubicación: Buenos Aires
Mensajes: 1.190
Antigüedad: 22 años, 6 meses
Puntos: 1
ayuda con switch

hola gente, arme unos menues dependientes, pero algo pasa con el switch y no funciona.
que sera?

aca esta toodo el codigo

<script language="JavaScript">
function cambiar(id){

var primario=document.forms.form1.primario;
var secundario=document.forms.form1.secundario;
secundario.length=0;

switch (primario.value){
case 100:
secundario.options[secundario.options.length] = new Option("primero", "1");
secundario.options[secundario.options.length] = new Option("segundo", "2");
secundario.options[secundario.options.length] = new Option("tercero", "3");
break;
case 101:
secundario.options[secundario.options.length] = new Option("cuarto", "4");
secundario.options[secundario.options.length] = new Option("quinto", "5");
secundario.options[secundario.options.length] = new Option("sexto", "6");
break;
}
}
</script>
<form method="POST" action="" name="form1">
<table border="0" cellspacing="2" cellpadding="2" align="center" class="bdetabla" bgcolor="#FFFFFF">
<tr>
<td>
<select name="primario" onChange="Javascript:cambiar();" style="width:200px">
<option value="100">Inbound Call</option>
<option value="101">Outbound Call</option>
</select>
</td>
<td>
<select name="secundario" style="width:200px">
</select>
</td>
</tr>
</table>
</form>
__________________
On error no hago nada porque deje de fumar...