Right Click Madness

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Babelicious
    Registered User
    • Apr 2002
    • 82

    #1

    Right Click Madness

    Hi

    I've seen pages that pops an alert when you right click
    (I know how to do that)

    I've seen pages that nothing happens when you right click
    (i know how to do that)

    I've seen pages that when you right click a sponsor site window pops up.

    How Do I do That?

    Sorry for being a moron,
    RoCkMaN
    <a href="http://ucbill.com/ucbill/index.php?ref=fastfems">MAKE 14 cents per CLICK</a>
    <a href="http://wm.mtree.com/webmasters/ref/?321760">Make $20 pre FREE signup</a>
  • Lawrence
    Registered User
    • Apr 2002
    • 7

    #2
    Here ya go:

    function noright() {
    // Whatever you want to happen when right click occurs
    window.open("http://www.yahoo.com");
    }

    function disableRightClick(btnClick)
    {
    if (navigator.appName == "Netscape" && btnClick.which == 3) // check for netscape and right click
    {
    noright();
    return false;
    }
    else if (navigator.appName =="Microsoft Internet Explorer" && event.button == 2) // for IE and Right Click
    {
    noright();
    return false;
    }
    }
    document.onmousedown = disableRightClick;

    Comment

    • Babelicious
      Registered User
      • Apr 2002
      • 82

      #3
      Works Awesome!

      Your the best, thanks a lot.

      Rockman
      <a href="http://ucbill.com/ucbill/index.php?ref=fastfems">MAKE 14 cents per CLICK</a>
      <a href="http://wm.mtree.com/webmasters/ref/?321760">Make $20 pre FREE signup</a>

      Comment

      Working...