Date:  07/14/2006 08:03:49 AM Msg ID:  003048
From:  Jeff Grippe Thread:  003041
Subject:  Re: Validate Using AJAX Part 2

I found this code to supress the ENTER key completly. It seems to work. From what I can see from reading other code, this doesn't work with Netscape, which uses a different document model. This code works with IE which is what most of my users are using. The Netscape versions are available on the web.

 

document.onkeydown = SupressEnter; // trap keyboard event

function SupressEnter()

{
 if (event.keyCode == 13) // do not allow ENTER key
 { 
     return false;
 }
}