Jquery Disabling Input Not Working
I have some input elements on a page, and am trying to enable them or disable them according to the setting of a pair of radio buttons. I'm using the following Javascript function
Solution 1:
The answer to JQuery readOnly strange behavior explains your problem.
individual
comes from a checkbox; it is a string. You have to cast it properly to a boolean:
$("#Surname").prop("disabled", (individual == "false" ? false : true));
Post a Comment for "Jquery Disabling Input Not Working"