Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
my code:
XML
<script type="text/javascript">
            $('#myDiv').keydown(function (e) {
                if ((e.which == 13) || (e.which == keyCode.ENTER)) {
                    alert("enter pressed");
                    //$('#btnSaveAU').trigger('click');
                }
            })
</script>



design:

XML
<div id="myDiv" runat="server">
                 <asp:TextBox ID="txtAuthorisedPwd" Width = "150px" TextMode="Password" Height="18px"   runat="server"></asp:TextBox>
                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAuthorisedPwd"
                  ErrorMessage="Password is required." ToolTip="Password is required."
                  ValidationGroup="SaveAU">*</asp:RequiredFieldValidator>
                         </div>



it is not working firefox and crome


Regrads
sadhana belge
Posted
Comments
Style-7 13-Apr-15 6:22am    
Why "keydown"? May be "on button click" event?
sadhana4 13-Apr-15 6:59am    
when i will put value in the textbox and i pressed Enter key
nothing happened. i want to call the button clicked event when i enter textbox
sadhana4 21-Apr-15 2:13am    
i solved .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900