Created
July 12, 2017 23:19
-
-
Save A2H111/fc7e3f56315999b6e5beda5ff71f1fd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://code.jquery.com/jquery-3.0.0.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
//Attach change event to radiobuttonlist controls | |
$("input:radio").change(function (obj) { | |
//Get the selected radiobutton value | |
var type = $.trim($(this).val()); | |
//check if value selected is equal to Yes | |
if (type == "Yes") { | |
//find the textbox control based on selected radiobutton control | |
//Use the props to enable and disable the textbox control | |
$(this).closest(".container").find(".txtbox").prop("disabled", false); | |
} | |
else | |
$(this).closest(".container").find(".txtbox").prop("disabled", true); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment