Wednesday, April 13, 2005

Disable The Enter Key

I am trying to disable the enter key in a form - it works in IE but can I get it to work in Netscape or other browsers?

This block of Javascript should do the trick.

function BlockCR()
if (event.keyCode == 13) return false;
return true;

input type="Text" name="Foo" onkeydown="return BlockCR()"


Post a Comment

<< Home