> I tried to disable a multiple selection control using Javascript but
> it did not work. Can anyone please help me? Thanks in advance for your
> help.
Several things need fixed:
> <script language="javascript>
<script type="text/javascript">
> <!--
Don't use this
> function masking () {
> var aForm = window.document.aForm;
[quoted text clipped - 3 lines]
> aForm.selected_ae.disabled = false;
> }
function masking(o) {
var isA = (o.options[o.selectedIndex].value=="A");
o.form.elements['selected_ae[]'].disabled = isA;
}
> // -->
Don't use this
> <select name="build_type" size=1 onchange="masking()">
<select name="build_type" size="1" onchange="masking(this)">
Make the above changes and your code will both work and be better written.
Hope that helps.

Signature
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
ggk517@gmail.com - 28 Feb 2006 15:56 GMT
Thanks a lot for your help, Matt.
It really works!!!