Sumit Banglorkar

Sumit Banglorkar

  • NA
  • 38
  • 29.5k

JScript Runtime Error

Jul 17 2013 1:51 AM
Hi Friends,

I am facing below error on textbox keypress event(single quota validation & also for numberic validation), pls check below coding & give me solutions how to handled this error. (Using Master page)
Coding :- *.aspx
<asp:TextBox ID="TextBoxCreditPeriod" runat="server" ToolTip="Credit Period"
TabIndex="9" Width="55px" onkeypress="return validate(event)"                                         style="text-align:right; margin-left: 0px;"></asp:TextBox>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
function restrictQuotes(evt)
{
        var keyCode = evt.which ? evt.which : evt.keyCode;
        return (keyCode != '"'.charCodeAt() && keyCode != "'".charCodeAt());
}
</script>
</asp:Content>

Regards,
Sumit...

Answers (7)