Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: disable select object in ie5 and ns 4+


Message #1 by "sokuntheary en" <soken78@y...> on Fri, 25 Jan 2002 15:10:04

I have tried sending you the code as an attachment but that might not
have reached you ddue to some policies.
One thing is that forget all the 3D's. These were never a part of the
code that i have sent you and i have no idea as to where these things
have come in from.I am resending you the code, and if you still see any
3D's just remove them and the code should run fine.This is a piece of a
running code and please get back to me if you still faceany issues.

Thanks,
Nitin.

<HTML>
<HEAD>
<META NAME=3D"GENERATOR" Content=3D"Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<Script Language =3D "javascript">

function fun(){
Count =3D 0;
if(document.frmForm.select1.value=3D=3D"two"){
for( Count =3D 0; Count<=3Ddocument.frmForm.select2.length ;Count++){
removeOption =3D new
Option(document.frmForm.select2[0].value,document.frmForm.select2[0].val
ue);
document.frmForm.select2.remove(removeOption,[0]);
Count=3D0;

}
}


}

</SCRIPT>
<BODY>
<form name =3D "frmForm">
<P><SELECT id=3Dselect1 name=3Dselect1
style=3D"HEIGHT: 22px; WIDTH: 278px" onChange=3D"javascript:fun();" >
<OPTION selected value=3D"one">one</OPTION>
<OPTION VALUE =3D "two">two</OPTION>
<OPTION value=3D"three">three</OPTION>
<OPTION value=3D"four">four</OPTION>
</SELECT></P>
<P>&nbsp;</P>
<P><SELECT id=3Dselect2 name=3Dselect2 style=3D"HEIGHT: 22px; WIDTH: 
277px">
<OPTION selected value=3D"one">one</OPTION>
<OPTION VALUE =3D "two">two</OPTION>
<OPTION value=3D"three">three</OPTION>
<OPTION value=3D"four">four</OPTION>
 </SELECT></P>
<P>&nbsp;</P>

</form>
</BODY>
</HTML>

  Return to Index