Link to home
Start Free TrialLog in
Avatar of Tagor
Tagor

asked on

Disable radio buttons / onChange event

Hello,

I have two radio buttons called "radiobuttons". The one has as value "number1" and the other one has as value "number2".

How can I disable then using javascript by using an onChange event?

Avatar of archrajan
archrajan

<input type = "radio" name = "radio1" onclick = "javascript: this.disabled = true">
SOLUTION
Avatar of archrajan
archrajan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
use onclick or onchange whichever will suit ur requirement..
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
... meaning, if there is more than one radio with the same name, then use the index number as I described above.
Avatar of Tagor

ASKER

Thanks guys!