471,337 Members | 794 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

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

Hi,

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

tks a lot !
Ken
Nov 18 '05 #1
8 2310
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

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

tks a lot !
Ken

Nov 18 '05 #2
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com> 级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

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

tks a lot !
Ken


Nov 18 '05 #3
isn't that a javascript thing?

On Mon, 1 Nov 2004 16:39:07 +0800, "Ken Yu" <no**@none.com> wrote:
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com> 级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

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

tks a lot !
Ken



Nov 18 '05 #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" <no**@none.com> wrote in message
news:OZ****************@TK2MSFTNGP09.phx.gbl...
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com>

级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

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

tks a lot !
Ken



Nov 18 '05 #5
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" <no**@none.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com>

级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
Hi,

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

tks a lot !
Ken



Nov 18 '05 #6
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" <ks******@takempis.com> wrote in message
news:uI*************@TK2MSFTNGP10.phx.gbl...
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" <no**@none.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com>

级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
Ken,

Setup your oncontextmenu event handler that will do nothing.

Eliyahu

"Ken Yu" <no**@none.com> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> How can i disable "RightClick Menu" in Internet Explorer, when> access the frontpage ?
>
> tks a lot !
> Ken
>
>



Nov 18 '05 #7
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" <re*************@monarchmed.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
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" <ks******@takempis.com> wrote in message
news:uI*************@TK2MSFTNGP10.phx.gbl...
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" <no**@none.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
Eliyahu,

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

How can do that ?

tks a lot !
Ken
"Eliyahu Goldin" <re*************@monarchmed.com>

级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl...
> Ken,
>
> Setup your oncontextmenu event handler that will do nothing.
>
> Eliyahu
>
> "Ken Yu" <no**@none.com> wrote in message
> news:%2******************@TK2MSFTNGP12.phx.gbl...
>> Hi,
>>
>> How can i disable "RightClick Menu" in Internet Explorer,

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



Nov 18 '05 #8
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" <ks******@takempis.com> wrote in message news:<Ok**************@TK2MSFTNGP09.phx.gbl>...
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" <re*************@monarchmed.com> wrote in message
news:eK**************@TK2MSFTNGP09.phx.gbl...
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" <ks******@takempis.com> wrote in message
news:uI*************@TK2MSFTNGP10.phx.gbl...
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" <no**@none.com> wrote in message
news:OZ**************@TK2MSFTNGP09.phx.gbl...
> Eliyahu,
>
> Sorry ! I want to disable "RightClick Menu" in WebForm ?
>
> How can do that ?
>
> tks a lot !
> Ken
>
>
> "Eliyahu Goldin" <re*************@monarchmed.com> 级糶秎ン穝籇:uh****************@TK2MSFTNGP10.phx .gbl... > > Ken,
> >
> > Setup your oncontextmenu event handler that will do nothing.
> >
> > Eliyahu
> >
> > "Ken Yu" <no**@none.com> wrote in message
> > news:%2******************@TK2MSFTNGP12.phx.gbl...
> >> Hi,
> >>
> >> How can i disable "RightClick Menu" in Internet Explorer, when > >> access the frontpage ?
> >>
> >> tks a lot !
> >> Ken
> >>
> >>
> >
> >
>
>


Nov 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Simon Wigzell | last post: by
1 post views Thread by xlar54 | last post: by
reply views Thread by =?Utf-8?B?cmZsYXphcm8=?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.