jason_kelly
10-11-2011, 09:25 PM
Hello,
I need your help.
I basically need, when the enter button is pressed on the keyboard to trigger a button. Currently, my code works but it just refreshes the page and does not actually trigger the desired button:
//HERES MY CUSTOM BUTTON:
<BUTTON TYPE="submit"
onMouseOver="goLite(this.name)"
onMouseOut="goDim(this.name)"
onclick="javascript:v7_search()"
CLASS="btn_std"
NAME="btn_search"
> ? Search
</BUTTON>
Here's the code to make the enter button work:
<form name="frmIMTS"
onkeydown="javascript:if (event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('btn_search').click();}};"
>
Any help with this is greatly appreciated.
Cheers,
J
I need your help.
I basically need, when the enter button is pressed on the keyboard to trigger a button. Currently, my code works but it just refreshes the page and does not actually trigger the desired button:
//HERES MY CUSTOM BUTTON:
<BUTTON TYPE="submit"
onMouseOver="goLite(this.name)"
onMouseOut="goDim(this.name)"
onclick="javascript:v7_search()"
CLASS="btn_std"
NAME="btn_search"
> ? Search
</BUTTON>
Here's the code to make the enter button work:
<form name="frmIMTS"
onkeydown="javascript:if (event.which || event.keyCode){if ((event.which == 13) || (event.keyCode == 13)) {document.getElementById('btn_search').click();}};"
>
Any help with this is greatly appreciated.
Cheers,
J