My JavaScript code is not displaying the text as expected when a certain number is entered on my ASP.NET website. Here is the relevant code snippet:
<div class="fltlft">
<%--<asp:TextBox ID="txtCreditPoint" runat="server" AutoCompleteType="Disabled"></asp:TextBox>--%>
<asp:TextBox ID="txtCreditPoint" runat="server" AutoPostBack="false" AutoCompleteType="Disabled"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvCreditPoint" runat="server" ControlToValidate="txtCreditPoint"
ErrorMessage="Point is required." Text="*" ForeColor="Red" ToolTip="Point is required"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="rvCreditPoint" runat="server" ControlToValidate="txtCreditPoint"
ErrorMessage="Point is not valid. Must be 1-10" ForeColor="Red" Text="*"
MinimumValue="1" MaximumValue="10" Type="Integer"></asp:RangeValidator>
<a href="point_value.html" onclick="window.open('point_value.html', 'newwindow', 'width=300, height=125'); return false;" style="font-size: 16px">?</a>
<br />
<asp:Literal ID="ltrRecomendedPoin" runat="server"></asp:Literal>
<br />
<asp:Label ID="lblUSDValue" Text="" runat="server" ></asp:Label>
</div>
<script>
$(document).ready(function () {
$('<%= txtCreditPoint.ClientID %>').change(function () {
if ($('<%= txtCreditPoint.ClientID %>').val() == "1") {
$('<%= lblUSDValue.ClientID %>').text("You are valuing this game at a range of $1.00 to $5.00");
}
});
});
</script>