I received the following in an e-mail. This code worked perfectly.
------------------------------------------------------------
Hi Mike,
You need to use "form.object.disabled=true/false"
I've written all the code you need below.
Best wishes
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/javascript">
function shade(){
if(document.testform.status.checked==true){documen t.testform.content.disable
d=true}
else{document.testform.content.disabled=false}
}
</script>
</head>
<body>
I think what you're looking for is "form.object.disabled=true/false"<br><br>
<form name="testform">
<input type="checkbox" name="status" checked onClick="shade()">Disabled
when checked<br>
<input type="text" name="content" size="40" value="Disabled - UnCheck to
Enable" maxlength="40" disabled>
</form>
(Mike N.) wrote in message news:<17**************************@posting.google. com>...
I am looking to use an HTML checkbox feature as a trigger to
shade/unshade a multiple select field in an HTML form. For instance:
there are four options in the multiple select field and one outside of
it. Is there a simple way, using JavaScript, so that if the outside
option is selected, or "checked", the multiple select field will be
shaded (unusable) and if it's deselected, or "unchecked", the multiple
select field will be unshaded (usable)? Also, if the outside field is
checked, it's value should be written upon submittal.
Thanks in advance!