0

Trying to figure this one out.  There’s a very simple script function to check the state of a checkbox on a custom ASPX form, and show or hide a table row accordingly.  It works just fine in 2010.  In 2013, we get the error that the function being called is undefined, and the showing/hiding don’t work.  Any ideas why that would be the case?  Thanks for looking!

The function definition (located as the very last element of the ASPX page, after the final </asp:Panel>

<script type=”text/javascript” language=”javascript”>

$(function ChkClosedClicked(sender) {

if ($(“input[name$=ChkClosed]”).is(‘:checked’))

$(‘#<%=trFinalEmail.ClientID %>’).show();

else

$(‘#<%=trFinalEmail.ClientID %>’).hide();

}

);

</script>

The relevant part of the table and field definitions:

<tr>

<td class=”formlabel”>

Closed?

</td>

<td class=”formfield”>

<div class=”clearfloat”>

<asp:CheckBox ID=”ChkClosed” runat=”server” AutoPostBack=”false” Checked=”false”

Text=” “ onClick=”ChkClosedClicked(this)” />

</div>

<div class=”clearfloat”>

</div>

</td>

</tr>

<tr id=”trFinalEmail” runat=”server” style=”display: none”>

<td class=”formlabel”>

Final Email

</td>

<td class=”formfield”>

<div class=”clearfloat”>

<asp:TextBox ID=”TxtFinalEmail” CssClass=”txt” runat=”server” TextMode=”MultiLine”

Rows=”6″ Columns=”20″ Width=”400px”></asp:TextBox>

</div>

<div class=”clearfloat”>

</div>

</td>

</tr>

(Visited 165 times, 1 visits today)
Add a Comment