netscape + enter key problem

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

Hi,

The problem is like this, I have a textbox and a button, I wanted to disable
the enter key, so as to prevent the user from hitting the enter and seeing
undesirable results. I used this function
function disableEnterKey()
{
if (window.event.keyCode == 13) window.event.keyCode = 0;
}

the disable key works perfectly in IE
but only in some instance of Netscape,
for eg: when the page loads and the user hits the enter key, nothing happens
but when the user click on the textbox (does not enter anything...)and hits
the enter key, the button fires and gives wrong results.

Please advice,
Stephen.
 
Stephen,

I really would ask this in a JavasScript newsgroup.

It is possible that someone here knows your answer, however that is the same
as than someone can give you here an answer about birthcontrol.

Just my thought.

Cor
 
Back
Top