Hi All,
I'm having problem with the onkeypress attribute, I'm not sure if my code is right. When pressing the enter button, the javascript function would work on IE but not in Firefox. I'm not sure if the event keyCode is being recognized by Firefox or if I'm missing something...
Here's a code snippet of my code:
<td width="270px"><input type="text" id="searchB" value="" style ="font-family:Verdana; font-size:10pt; width: 270px; height:100% ;" onkeypress="enterHere();" onFocus="this.select();" ></td>
<script language="javascript" type="text/javascript">
function enterHere()
{
if((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13))
{
find();
}
}
</script>
Can anyone help me on this...????
Thanks... :)