Netscape + enter key Problem

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top