...

View Full Version : disable/enable button



eck35
11-12-2003, 04:15 PM
Greetings all.
And of course, many thanks in advance.

How can I enable a button after I disable it with:

document.forms(0).Submit.disabled='true';

in a function from the onload() event?

I want the button to be enabled when the user selects a particular radio button. I have tried:

document.forms(0).Submit.disabled='false';

in a function from the onClick() event of the radio button, but to no avail.

Any input or direction would be greatly appreciated.


Again, many thanks


eck35

Kor
11-12-2003, 05:19 PM
Try the method "checked" instead of "disabled"

adios
11-12-2003, 05:26 PM
<input type="radio"....onclick="Submit.disabled=false">

...assuming it's all in the same form.

Using parentheses as array notation - like document.forms(0) - is IE-only.

true / false are Boolean values - a data type and are not strings so, no quotes.

Make sure to capitalize 'Submit' as a button name, if you use it at all...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum