How to Enable a button in html if the radio button is checked. this is to be done dynamically as if the radio button gets unchecked the button should also get disabled automatically. is there any possible way to do this using javascript or Jquery..code should should be in php
You can't uncheck a radio button, but if you want to do it on a checkbox, here is a suggestion using jquery:
$("#checkBoxID").on("change", function(e) {
$("#buttonID").prop("disabled",!$("#checkBoxID").is(":checked"));
});
This will set the disabled attribute on the button to the opposite of the checked attribute.
•Box Checked? Disabled Attribute on button set to false
•Box unchecked? Disabled attribute on button set to true
Updates dynamically as the checkbox is selected.
-- edit --
Here is a link to a JSFiddle of this working as described and requested.