Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/03/2012, 15:04
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Numeros Unicos

prueba con este
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="http-equiv" content="Content-type: text/html; charset=UTF-8"/>
<script type="text/javascript">
function getElement(elElemento) {
return document.getElementById(elElemento);
}



function funcion(select) {
var nextSelect = '', posOpcion = 1;
for(var i = 0; combo = select.form.elements[select.name][i]; i++){
if(combo.id == select.id) nextSelect = select.form.elements[select.name][i+1].id; // Siguiente select
}

for(var i = 1; select.options[i]; i++){

if (select.selectedIndex == 0) { // Si valor por defecto
while(getElement(nextSelect).length > 1) getElement(nextSelect).removeChild(getElement(next Select).options[i]);
break;
}


if (i == select.selectedIndex)
continue;

nuevasOpciones = new Option(select.options[i].value, select.options[i].text);
eval(getElement(nextSelect).options[posOpcion++] = nuevasOpciones);
}
}
</script>
</head>
<body>
Arreglo a la opción que se selecciones en el primer combo, no aparecerá en el segundo, etc...<br>
<form id="form1" name="form1" method="post" action="">
<select id="idioma1" name="idioma[]" size="10" onchange="funcion(this)">
<option value="">Idiomas</option>
<option value="Espa&ntilde;ol">Espa&ntilde;ol</option>
<option value="Ingl&eacute;s">Ingl&eacute;s</option>
<option value="Franc&eacute;s">Franc&eacute;s</option>
<option value="Portugu&eacute;s">Portugu&eacute;s</option>
</select>

<select id="idioma2" name="idioma[]" size="10" onchange="funcion(this)">
<option value="">Idiomas</option>
</select>

<select id="idioma3" name="idioma[]" size="10">
<option value="">Idiomas</option>
</select>
</form>
</body>
</html>
__________________
if(ViolenciaDeGénero) {alert('MUJER ASESINADA');}