------------------------------------------------------------------------------------------------
No puedo hacer un disabled a un o varios option de un select en IE, en Firefox funciona bien.
Este es el ejemplo:
Código PHP:
<html>
<head>
<script language="javascript" type="text/javascript">
<!--
function cond_1(){
frm = document.Form1;
ord = frm.p1.selectedIndex;
alert("has seleccionado la opcion: " +ord);
switch(ord) {
case 0:
break;
case 1:
frm.p2[1].disabled = true;
frm.p2.options[2].disabled = true;
document.getElementById("p2")[3].disabled = true;
document.getElementById("p2").options[4].disabled = true;
frm.p2[6].disabled = false;
frm.p2.options[7].disabled = false;
break;
case 2:
frm.p2[1].disabled = false;
frm.p2.options[2].disabled = false;
document.getElementById("p2")[3].disabled = false;
document.getElementById("p2").options[4].disabled = false;
frm.p2[6].disabled = true;
frm.p2.options[7].disabled = true;
break;
}
}
-->
</script>
</head>
<body>
<form id="Form1" name="Form1" method="post" action="">
<select name="p1" id="p1" onchange="javascript:cond_1(this.value);">
<option value="" selected="selected"></option>
<option value="1">opcion 1</option>
<option value="2">opcion 2</option>
</select>
<br>
<br>
<select name="p2" id="p2">
<option value="" selected="selected"></option>
<option value="1">opcion 1</option>
<option value="2">opcion 2</option>
<option value="3">opcion 3</option>
<option value="4">opcion 4</option>
<option value="5">opcion 5</option>
<option value="6" disabled="disabled">opcion 6</option>
<option value="7" disabled="disabled">opcion 7</option>
</select>
</form>
</body>
</html>
está subido en www.crojasf.com/selectjs3.html
Alguien me puede ayudar?????