T
tshad
I am trying to disable and enable a checkbox from javascript.
The problem is that if the checkbox starts out as:
<input id="Override" type="checkbox" name="Override"/>
I can change it back and forth with no problems.
using disabled = true or disabled = false
If I start out as:
<input id="Override" type="checkbox" name="Override" disabled="disabled"/>
I can never enable it again using the above statements.
I found a description of disabled as:
***********************************************************************
disabled
Type: boolean
Indicates whether the checkbox is disabled or not. If this attribute is set
to true, the checkbox is disabled. This is usually drawn with the text in
grey. If the checkbox is disabled, it does not respond to user actions. The
element cannot be focused and the command event will not fire. The element
will still respond to mouse events. To enable the checkbox, leave the
attribute out entirely as opposed to setting the value to false.
*********************************************************************************
How do you take the disabled attribute out using Javascript?
Is there some other way to make this work?
I don't have the same problem with a textbox. If it is set a
disabled="disabled", I can still enable and disable at will.
Thanks,
Tom
The problem is that if the checkbox starts out as:
<input id="Override" type="checkbox" name="Override"/>
I can change it back and forth with no problems.
using disabled = true or disabled = false
If I start out as:
<input id="Override" type="checkbox" name="Override" disabled="disabled"/>
I can never enable it again using the above statements.
I found a description of disabled as:
***********************************************************************
disabled
Type: boolean
Indicates whether the checkbox is disabled or not. If this attribute is set
to true, the checkbox is disabled. This is usually drawn with the text in
grey. If the checkbox is disabled, it does not respond to user actions. The
element cannot be focused and the command event will not fire. The element
will still respond to mouse events. To enable the checkbox, leave the
attribute out entirely as opposed to setting the value to false.
*********************************************************************************
How do you take the disabled attribute out using Javascript?
Is there some other way to make this work?
I don't have the same problem with a textbox. If it is set a
disabled="disabled", I can still enable and disable at will.
Thanks,
Tom