Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - How can i disable "RightClick Menu" in Internet Explorer ?

 
Thread Tools Search this Thread
Old 11-01-2004, 07:59 AM   #1
Default 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




Ken Yu
  Reply With Quote
Old 11-01-2004, 08:33 AM   #2
Eliyahu Goldin
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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
  Reply With Quote
Old 11-01-2004, 08:39 AM   #3
Ken Yu
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> 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
  Reply With Quote
Old 11-01-2004, 09:05 AM   #4
Eliyahu Goldin
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> > 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
  Reply With Quote
Old 11-01-2004, 09:08 AM   #5
JuLiE Dxer
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
>> 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
  Reply With Quote
Old 11-01-2004, 01:30 PM   #6
Kevin Spencer
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> > 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
  Reply With Quote
Old 11-01-2004, 01:55 PM   #7
Eliyahu Goldin
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> > > 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
  Reply With Quote
Old 11-01-2004, 02:48 PM   #8
Kevin Spencer
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> > > > 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
  Reply With Quote
Old 11-02-2004, 02:20 AM   #9
Justin Beckwith
 
Posts: n/a
Default Re: How can i disable "RightClick Menu" in Internet Explorer ?
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% .gbl...
> > > > > 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
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8 RC1 Admin Front Page News 0 01-29-2009 02:19 PM
How do I fix (Internet Explorer cannot display the webpage)? coffeyman MCTS 4 01-26-2009 04:07 PM
Re: Microsoft Internet Explorer rock A+ Certification 2 11-03-2005 08:06 PM
Re: Microsoft Internet Explorer Jason Peavey A+ Certification 0 11-03-2005 08:03 PM
Re: Microsoft Internet Explorer Atxa A+ Certification 0 11-01-2005 05:09 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46