SCRIPT5009: 'DefaultButtonKeyPress' is undefined issue in IE

Posted by Sahoo under ASP.NET on 8/7/2012 | Points: 10 | Views : 2679 | Status : [Member] | Replies : 1

I am getting follwoing script in IE only " SCRIPT5009: 'DefaultButtonKeyPress' is undefined " when pressing any key
My code is like
<asp:Literal ID="lblUserName" runat="server"
Text="UserName" /></label>
<asp:TextBox ID="txtUserName" runat="server" />
<asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtUserName"
ErrorMessage="UserName Required" Display="Dynamic" Text="*" SetFocusOnError="True" />

When it run in IE it get converted into
<input name="txtUserName" type="text" value="" id="txtUserName" onkeydown="DefaultButtonKeyPress(event, 'btnLogin')" />
<span id="rfvEmail" style="color:Red;display:none;">*</span>

What is the reason of script error ?

Thanks in advance


Posted by: Vuyiswamb on: 8/7/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Do you have a JQuery Code that assign an Event to this textbox ?

Where is the definition of a Javascript function "DefaultButtonKeyPress" ?

Thank you for posting at Dotnetfunda

Sahoo, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response