Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable F5 / Refresh button for Netscape Browser

    Hi All,
    I am able to disable the F5 and Refresh button using Javascript for Internet Explorer but haven't been able to find a solution for Netscape browsers

    The code i have used for IE is



    if (document.all){
    document.onkeydown = function (){
    var key_f5 = 116; // 116 = F5

    if (key_f11==event.keyCode){
    alert("F5 pressed");
    return false;
    }
    }
    }


    Plz help me find a solution!!!



    Rgds
    Vandana

  • #2
    Regular Coder
    Join Date
    Dec 2002
    Location
    a bit west of pittsburgh
    Posts
    236
    Thanks
    1
    Thanked 0 Times in 0 Posts
    function document.onKeyPress()
    {
    if(event.keyCode=116)return false;
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •