Thursday, 8 August 2013

display text when checkbox is checked

display text when checkbox is checked

I need to have a row of text display when a checkboxed is checked. I know
this is pretty simple, but I am new to this and when I try to read other
answers to this question I get lost.
this is what I have:
Function RiskPlanRqd() {
if ($("#RiskMgmtPlan").val() == '1') {
$("#PlanStatus").show();
$("#CreatePlan").show();
$("#NotStarted").show();
} else {
$("#PlanStatus ").hide();
$("#CreatePlan").hide();
$("#NotStarted").hide();
}
}
Then for the checkbox I have:
<input type="checkbox" value "1" id"RiskMgmt" />Risk Management Plan<br />
and for the text I want to show up if checked i have:
<td> <span id="PlanStatus" style="display:none">Plan Status:</span> </td>
<td> <span id="NotStarted" style="display:none">Not Started</span> </td>

No comments:

Post a Comment