I have develop asp.net application in that I have search option for the clients. When I enter the client name in textbox then I press the Enter key from keyboard it is working fine in Firefox and Chrome but didn’t fire in IE8 here I have post my code what I did for KeyEvent fire:
<script type="text/javascript">
function KeyPress() {
if (event.keyCode == 13) { //if they pressed enter key then..
document.formname.LoginButton.focus();
}
}
</script>
How can I resolve this to fire the Keypress event in IE? Please help me…
Try this solution.
HTML:
Javascript (include it in the code-behind or in HTML):