Z
zlf
Hello
Currently, I'm using javascript to respond the "ENTER" button press event in
my ASPNET page.
It works fine when there is no multi-line textbox, but when multi-line
textbox is presented in page, and user enters "ENTER" button, both of my
javascript and textbox responses it.
It is unexpected. How can I ask my javascript to ignore it in this case or
ask TextBox to accept ctrl+enter as "ENTER".
<script type="text/javascript">
function keyDown()
{
var keycode=event.keyCode;
if(keycode==13){
event.keyCode=65;
__doPostBack('ctl00$ctl00$SsnContentPlaceHolder$SearchButton','');
}
}
document.onkeydown=keyDown;
</script>
Thanks
Currently, I'm using javascript to respond the "ENTER" button press event in
my ASPNET page.
It works fine when there is no multi-line textbox, but when multi-line
textbox is presented in page, and user enters "ENTER" button, both of my
javascript and textbox responses it.
It is unexpected. How can I ask my javascript to ignore it in this case or
ask TextBox to accept ctrl+enter as "ENTER".
<script type="text/javascript">
function keyDown()
{
var keycode=event.keyCode;
if(keycode==13){
event.keyCode=65;
__doPostBack('ctl00$ctl00$SsnContentPlaceHolder$SearchButton','');
}
}
document.onkeydown=keyDown;
</script>
Thanks