disable combobox when radio button is selected

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
shamilwebdev
Forum Newbie
Posts: 5
Joined: Thu Oct 03, 2013 4:30 am

disable combobox when radio button is selected

Post by shamilwebdev »

Hi all,

I'm fairly new to jsp. I have a form with 3 text boxes and 2 radio buttons. I would like to disable the 2nd and 3rd combobox if the first radio button is selected and all 3 combobox should be enable if 2nd radio button is selected.

I am doing it in Javascript

Thanks in advance :help:
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: disable combobox when radio button is selected

Post by Celauran »

Text boxes, combo boxes, JSP? You've got your terms a little mixed up here so I'm not entirely sure what you're trying to do, but attaching a listener to your radio button(s) would be a good place to start. Check the value on change and then add/remove the disabled attribute where needed.
Post Reply