• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

Enable/Disable droplist in Netscape

Could any of you guys tell me how can i enable/disable a droplist in Netscape 4.7

For example:

<select name="dropList" size=1>
<option> 1
<option> 2
<option> 3
</select>

Can i dis/enable this dropList ?

Thanks in advance
0
lebuihung
Asked:
lebuihung
1 Solution
 
ldbkuttyCommented:
<html>
<head>
<script language="JavaScript" type="text/javascript">
var selState= false;
function HandleDropList() {
 f=document.change_status;
 f.dropList.disabled = selState;
 selState = !selState;
}
</script>
</head>
<form name="change_status" method="post" action="">
<select name="dropList" size="1" disabled="disabled">
<option value=""></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<a href="#" onclick="HandleDropList();this.innerHTML=(this.innerHTML=='Enable')?'Disable':'Enable';">Enable</a>
</form>
</body>
</html>
0
 
lebuihungAuthor Commented:
It doesnt work. Tested on Netscape 4.8
0
 
Michel PlungjanIT ExpertCommented:
<html>
<head>
</head>
<form name="change_status" method="post" action="">
<select name="dropList" size="1" disabled="disabled" onChange="if (this.disabled) this.selectedIndex=0" >
<option value="">Please select</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input type="radio" name="r1" onClick="this.form.dropList.disabled=true" checked>Disable
<input type="radio" name="r1" onClick="this.form.dropList.disabled=false">Enable
</form>
<script>
// needed if default is disabled - delete the script if default is ENABLED
document.forms[0].dropList.disabled=true; /* NS4 does not have a built-in disabled attribute but will react to it if it is set after the form */
</body>
</html>
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now