brookey86
05-07-2008, 04:43 PM
I have this working in IE with the code below, but it does nothing in Firefox (and Safari, Opera). Basically if a user clicks the enter key at ANY time, I want the "NEXT" button to be clicked.
function fnTrapKeyDown(e)
{
if (document.all)
{
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancel = true;
document.getElementById("NEXT").click();
}
}
}
Please help me in adapting this for Firefox (and possibly the other two browsers), because I'm stuck.
function fnTrapKeyDown(e)
{
if (document.all)
{
if (event.keyCode == 13)
{
event.returnValue=false;
event.cancel = true;
document.getElementById("NEXT").click();
}
}
}
Please help me in adapting this for Firefox (and possibly the other two browsers), because I'm stuck.