SharePoint Designer 2010 - Disable Textbox when Checkbox = True on EditForm.aspx
-
I'm using the following script (found on line) to disable a multi-line text box form field control on a custom EditForm.aspx page using SharePoint Designer:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">$(document).ready(function() {
// add change handler
$("input[title='chkBox']").change(function() {
MasterSelectChange();
});
// call the change function to set up form for first display:
MasterSelectChange();
});function MasterSelectChange()
{
var thisVal = $("input[ID='chkBox']").val();
if(thisVal == "True")
{
$("select[ID='Comments']").enabled="True";
}
else
{
$("select[ID='Comments']").enabled="False";
}
}
</script>I don't get an error and can't figure out why it isn't working. Does anyone have a similar solution or see why this script won't work?
Thanks!
-
I'm using the following script (found on line) to disable a multi-line text box form field control on a custom EditForm.aspx page using SharePoint Designer:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">$(document).ready(function() {
// add change handler
$("input[title='chkBox']").change(function() {
MasterSelectChange();
});
// call the change function to set up form for first display:
MasterSelectChange();
});function MasterSelectChange()
{
var thisVal = $("input[ID='chkBox']").val();
if(thisVal == "True")
{
$("select[ID='Comments']").enabled="True";
}
else
{
$("select[ID='Comments']").enabled="False";
}
}
</script>I don't get an error and can't figure out why it isn't working. Does anyone have a similar solution or see why this script won't work?
Thanks!