How can i disable "RightClick Menu" in Internet Explorer ?

Discussion in 'ASP .Net' started by Ken Yu, Nov 1, 2004.

  1. Ken Yu

    Ken Yu Guest

    Hi,

    How can i disable "RightClick Menu" in Internet Explorer, when
    access the frontpage ?

    tks a lot !
    Ken
     
    Ken Yu, Nov 1, 2004
    #1
    1. Advertising

  2. Ken,

    Setup your oncontextmenu event handler that will do nothing.

    Eliyahu

    "Ken Yu" <> wrote in message
    news:%2322Oyk%...
    > Hi,
    >
    > How can i disable "RightClick Menu" in Internet Explorer, when
    > access the frontpage ?
    >
    > tks a lot !
    > Ken
    >
    >
     
    Eliyahu Goldin, Nov 1, 2004
    #2
    1. Advertising

  3. Ken Yu

    Ken Yu Guest

    Eliyahu,

    Sorry ! I want to disable "RightClick Menu" in WebForm ?

    How can do that ?

    tks a lot !
    Ken


    "Eliyahu Goldin" <> ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > Ken,
    >
    > Setup your oncontextmenu event handler that will do nothing.
    >
    > Eliyahu
    >
    > "Ken Yu" <> wrote in message
    > news:%2322Oyk%...
    >> Hi,
    >>
    >> How can i disable "RightClick Menu" in Internet Explorer, when
    >> access the frontpage ?
    >>
    >> tks a lot !
    >> Ken
    >>
    >>

    >
    >
     
    Ken Yu, Nov 1, 2004
    #3
  4. Ken,

    When you right-click an html element, browser triggers oncontextmenu event.
    The menu you see now is generated by the default event handler. You want to
    disable the default behavior. To do this, you can write your own javascript
    event handler for oncontextmenu event that will just do nothing. So nothing
    will happen when you right-click.

    Eliyahu

    "Ken Yu" <> wrote in message
    news:OZjws6%...
    > Eliyahu,
    >
    > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    >
    > How can do that ?
    >
    > tks a lot !
    > Ken
    >
    >
    > "Eliyahu Goldin" <>

    ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > > Ken,
    > >
    > > Setup your oncontextmenu event handler that will do nothing.
    > >
    > > Eliyahu
    > >
    > > "Ken Yu" <> wrote in message
    > > news:%2322Oyk%...
    > >> Hi,
    > >>
    > >> How can i disable "RightClick Menu" in Internet Explorer, when
    > >> access the frontpage ?
    > >>
    > >> tks a lot !
    > >> Ken
    > >>
    > >>

    > >
    > >

    >
    >
     
    Eliyahu Goldin, Nov 1, 2004
    #4
  5. Ken Yu

    JuLiE Dxer Guest

    isn't that a javascript thing?

    On Mon, 1 Nov 2004 16:39:07 +0800, "Ken Yu" <> wrote:

    >Eliyahu,
    >
    > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    >
    >How can do that ?
    >
    >tks a lot !
    >Ken
    >
    >
    >"Eliyahu Goldin" <> ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    >> Ken,
    >>
    >> Setup your oncontextmenu event handler that will do nothing.
    >>
    >> Eliyahu
    >>
    >> "Ken Yu" <> wrote in message
    >> news:%2322Oyk%...
    >>> Hi,
    >>>
    >>> How can i disable "RightClick Menu" in Internet Explorer, when
    >>> access the frontpage ?
    >>>
    >>> tks a lot !
    >>> Ken
    >>>
    >>>

    >>
    >>

    >
     
    JuLiE Dxer, Nov 1, 2004
    #5
  6. Chances are, you don't want to disable right-click. You only think you do.
    What do you think yuou will accomplish with this? For example, some newbie
    web developers think that they can prevent people from copying images with
    such a trick. However, this is not possible. Generally speaking, disabling
    browser functionality is a bad idea, and is usually a kluge that substitutes
    for good design.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    I get paid good money to
    solve puzzles for a living

    "Ken Yu" <> wrote in message
    news:OZjws6#...
    > Eliyahu,
    >
    > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    >
    > How can do that ?
    >
    > tks a lot !
    > Ken
    >
    >
    > "Eliyahu Goldin" <>

    ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > > Ken,
    > >
    > > Setup your oncontextmenu event handler that will do nothing.
    > >
    > > Eliyahu
    > >
    > > "Ken Yu" <> wrote in message
    > > news:%2322Oyk%...
    > >> Hi,
    > >>
    > >> How can i disable "RightClick Menu" in Internet Explorer, when
    > >> access the frontpage ?
    > >>
    > >> tks a lot !
    > >> Ken
    > >>
    > >>

    > >
    > >

    >
    >
     
    Kevin Spencer, Nov 1, 2004
    #6
  7. I agree to the point that disabling browser functionality is a bad idea, but
    you don't have to disable the standard menu whatsoever.

    I am using rightclick a lot for standard windows form-like popup menu
    functionality. In a standard screen, where you have a datagrid for selecting
    rows, it is quite naturally to be able to rightclick a row and choose an
    action from the popup. You still can get the browser's standard menu when
    you click on other areas of the window.

    Eliyahu

    "Kevin Spencer" <> wrote in message
    news:...
    > Chances are, you don't want to disable right-click. You only think you do.
    > What do you think yuou will accomplish with this? For example, some newbie
    > web developers think that they can prevent people from copying images with
    > such a trick. However, this is not possible. Generally speaking, and is

    usually a kluge that substitutes
    > for good design.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > I get paid good money to
    > solve puzzles for a living
    >
    > "Ken Yu" <> wrote in message
    > news:OZjws6#...
    > > Eliyahu,
    > >
    > > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    > >
    > > How can do that ?
    > >
    > > tks a lot !
    > > Ken
    > >
    > >
    > > "Eliyahu Goldin" <>

    > ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > > > Ken,
    > > >
    > > > Setup your oncontextmenu event handler that will do nothing.
    > > >
    > > > Eliyahu
    > > >
    > > > "Ken Yu" <> wrote in message
    > > > news:%2322Oyk%...
    > > >> Hi,
    > > >>
    > > >> How can i disable "RightClick Menu" in Internet Explorer,

    when
    > > >> access the frontpage ?
    > > >>
    > > >> tks a lot !
    > > >> Ken
    > > >>
    > > >>
    > > >
    > > >

    > >
    > >

    >
    >
     
    Eliyahu Goldin, Nov 1, 2004
    #7
  8. Hi Eliyahu,

    Now, THERE's an example of good design!

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    I get paid good money to
    solve puzzles for a living

    "Eliyahu Goldin" <> wrote in message
    news:...
    > I agree to the point that disabling browser functionality is a bad idea,

    but
    > you don't have to disable the standard menu whatsoever.
    >
    > I am using rightclick a lot for standard windows form-like popup menu
    > functionality. In a standard screen, where you have a datagrid for

    selecting
    > rows, it is quite naturally to be able to rightclick a row and choose an
    > action from the popup. You still can get the browser's standard menu when
    > you click on other areas of the window.
    >
    > Eliyahu
    >
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > Chances are, you don't want to disable right-click. You only think you

    do.
    > > What do you think yuou will accomplish with this? For example, some

    newbie
    > > web developers think that they can prevent people from copying images

    with
    > > such a trick. However, this is not possible. Generally speaking, and is

    > usually a kluge that substitutes
    > > for good design.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > I get paid good money to
    > > solve puzzles for a living
    > >
    > > "Ken Yu" <> wrote in message
    > > news:OZjws6#...
    > > > Eliyahu,
    > > >
    > > > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    > > >
    > > > How can do that ?
    > > >
    > > > tks a lot !
    > > > Ken
    > > >
    > > >
    > > > "Eliyahu Goldin" <>

    > > ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > > > > Ken,
    > > > >
    > > > > Setup your oncontextmenu event handler that will do nothing.
    > > > >
    > > > > Eliyahu
    > > > >
    > > > > "Ken Yu" <> wrote in message
    > > > > news:%2322Oyk%...
    > > > >> Hi,
    > > > >>
    > > > >> How can i disable "RightClick Menu" in Internet Explorer,

    > when
    > > > >> access the frontpage ?
    > > > >>
    > > > >> tks a lot !
    > > > >> Ken
    > > > >>
    > > > >>
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Kevin Spencer, Nov 1, 2004
    #8
  9. just handle the oncontextmenu event of the document object, and return false.
    Example:
    <script language="Javascript">
    function document.oncontextmenu() {
    return false;
    }
    </script>

    hope this helps!


    "Kevin Spencer" <> wrote in message news:<Ok#>...
    > Hi Eliyahu,
    >
    > Now, THERE's an example of good design!
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > I get paid good money to
    > solve puzzles for a living
    >
    > "Eliyahu Goldin" <> wrote in message
    > news:...
    > > I agree to the point that disabling browser functionality is a bad idea,

    > but
    > > you don't have to disable the standard menu whatsoever.
    > >
    > > I am using rightclick a lot for standard windows form-like popup menu
    > > functionality. In a standard screen, where you have a datagrid for

    > selecting
    > > rows, it is quite naturally to be able to rightclick a row and choose an
    > > action from the popup. You still can get the browser's standard menu when
    > > you click on other areas of the window.
    > >
    > > Eliyahu
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:...
    > > > Chances are, you don't want to disable right-click. You only think you

    > do.
    > > > What do you think yuou will accomplish with this? For example, some

    > newbie
    > > > web developers think that they can prevent people from copying images

    > with
    > > > such a trick. However, this is not possible. Generally speaking, and is

    > usually a kluge that substitutes
    > > > for good design.
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > .Net Developer
    > > > Microsoft MVP
    > > > I get paid good money to
    > > > solve puzzles for a living
    > > >
    > > > "Ken Yu" <> wrote in message
    > > > news:OZjws6#...
    > > > > Eliyahu,
    > > > >
    > > > > Sorry ! I want to disable "RightClick Menu" in WebForm ?
    > > > >
    > > > > How can do that ?
    > > > >
    > > > > tks a lot !
    > > > > Ken
    > > > >
    > > > >
    > > > > "Eliyahu Goldin" <>

    > ¼¶¼g©ó¶l¥ó·s»D:uhmII2%...
    > > > > > Ken,
    > > > > >
    > > > > > Setup your oncontextmenu event handler that will do nothing.
    > > > > >
    > > > > > Eliyahu
    > > > > >
    > > > > > "Ken Yu" <> wrote in message
    > > > > > news:%2322Oyk%...
    > > > > >> Hi,
    > > > > >>
    > > > > >> How can i disable "RightClick Menu" in Internet Explorer,

    > when
    > > > > >> access the frontpage ?
    > > > > >>
    > > > > >> tks a lot !
    > > > > >> Ken
    > > > > >>
    > > > > >>
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >
     
    Justin Beckwith, Nov 2, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9t?=

    Disable Internet Explorer Toolbar

    =?Utf-8?B?VG9t?=, Jul 4, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    10,137
  2. Ed Hauptman
    Replies:
    7
    Views:
    1,101
    Ed Hauptman
    Aug 7, 2009
  3. JCharlie

    disable x button on internet explorer

    JCharlie, Sep 8, 2005, in forum: Javascript
    Replies:
    1
    Views:
    111
    Erwin Moller
    Sep 8, 2005
  4. Customize RightClick Menu

    , Sep 5, 2006, in forum: Javascript
    Replies:
    5
    Views:
    99
    Evertjan.
    Sep 6, 2006
  5. Water Cooler v2
    Replies:
    2
    Views:
    111
    Water Cooler v2
    Feb 6, 2007
Loading...

Share This Page