not sure if this will help or give a pointer, but we use this code to keep users from hitting the refresh key and escape keys. Our enviroment (3rd party web "browser-like" interface) doesn't have a back button, so we never dealt with that issue. it might be able to be tweaked for the back button too.

function document_onkeydown()
{       
        // keycode for F5 function
        // traps F5 key press assign to backspace
        // then cancels backspace ;-)
        if (window.event && window.event.keyCode == 116) {
                alert("diabled");
                window.event.keyCode = 8;

                // keycode for backspace
                if (window.event && window.event.keyCode == 8) {
                        // cancel the backspace
                        window.event.cancelBubble = true;
                        window.event.returnValue = false;
                        return false;
                }
        }
        
        // escape key
        if (window.event && window.event.keyCode == 27) {
                alert("disabled");
                window.event.returnValue = false;
        }
}

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to