Page 1 of 1

disable combobox when radio button is selected

Posted: Wed Oct 09, 2013 5:54 am
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:

Re: disable combobox when radio button is selected

Posted: Wed Oct 09, 2013 6:57 am
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.