How to Disable Return Key

S

shapper

Hello,

I am trying to disable Return 13. I am using a function which works
fine in Firefox but not in IE:

function checkCR(evt) {

var evt = (evt) ? evt : ((event) ? event : null);

var node = (evt.target) ? evt.target : ((evt.srcElement) ?
evt.srcElement : null);

if ((evt.keyCode == 13)) {return false;}

}

document.onkeypress = checkCR;

Could someone please help me out?

Thanks,
Miguel
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top