Connecting Tech Pros Worldwide Forums | Help | Site Map

Disabling contextmenu doesn't work in IE since I've installed google bar

emmajoh@gmail.com
Guest
 
Posts: n/a
#1: May 2 '06
Hi

I'm trying to disable IE contextmenu (on a right click) as I want to
create my own.
The problem is that since I've installed the latest version of the
google desktop, the script doesn't work.
No other script I found on the Internet is working anymore.

As you can see below, I've tried to catch every event I'm aware of:
___________________________

<html>
<head>
<script language=javascript>
function noRightClick(){
return false;
}

</script>
</head>

<body>


<script>
document.onmousedown=noRightClick;
document.onmouseup=noRightClick;
document.oncontextmenu=noRightClick;
window.onmousedown=noRightClick;
window.onmouseup=noRightClick;
window.oncontextmenu=noRightClick;
document.documentElement.onmousedown=noRightClick;
document.documentElement.onmouseup=noRightClick;
document.documentElement.oncontextmenu=noRightClic k;
document.body.onmousedown=noRightClick;
document.body.onmouseup=noRightClick;
document.body.oncontextmenu=noRightClick;
</script>
</body>
</html>

_____________________________________

What else can I do?
Even more frustrating, The new yahoo mail beta manage to do it as it
has its own contextmenu when you right-click on an email...

Help please!!!


Randy Webb
Guest
 
Posts: n/a
#2: May 2 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


emmajoh@gmail.com said the following on 5/2/2006 12:15 PM:[color=blue]
> Hi
>
> I'm trying to disable IE contextmenu (on a right click) as I want to
> create my own.[/color]

Another one re-inventing the wheel?
[color=blue]
> The problem is that since I've installed the latest version of the
> google desktop, the script doesn't work.[/color]

Hmmm. Uninstall the Google Desktop......
[color=blue]
> No other script I found on the Internet is working anymore.[/color]

Most didn't work to start with that messed with the context menu.

<snip>
[color=blue]
> Even more frustrating, The new yahoo mail beta manage to do it as it
> has its own contextmenu when you right-click on an email...[/color]

It does? Not for me.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
McKirahan
Guest
 
Posts: n/a
#3: May 2 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


<emmajoh@gmail.com> wrote in message
news:1146586507.142905.46810@v46g2000cwv.googlegro ups.com...[color=blue]
> Hi
>
> I'm trying to disable IE contextmenu (on a right click) as I want to
> create my own.
> The problem is that since I've installed the latest version of the
> google desktop, the script doesn't work.
> No other script I found on the Internet is working anymore.
>
> As you can see below, I've tried to catch every event I'm aware of:[/color]

Have you tried:

<body oncontextmenu="return false">


emmajoh@gmail.com
Guest
 
Posts: n/a
#4: May 2 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


I have tried that now but it doesn't work
I though writing <script>document.body=noRightClick;</script> was
the same anyway (where the function noRightClick() returns false).

McKirahan, I just saw you had a similar problem a while ago (it only
worked whith an alert() in the function).
How did you manage to solve your problem?

Randy Webb
Guest
 
Posts: n/a
#5: May 2 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


emmajoh@gmail.com said the following on 5/2/2006 12:41 PM:[color=blue]
> I have tried that now but it doesn't work[/color]

What doesn't work?

Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.

<URL: http://www.safalra.com/special/googlegroupsreply/ >
[color=blue]
> I though writing <script>document.body=noRightClick;</script> was
> the same anyway (where the function noRightClick() returns false).[/color]

No. It is not even close. What do you think setting the document.body to
a reference to a function is supposed to do?
[color=blue]
> McKirahan, I just saw you had a similar problem a while ago (it only
> worked whith an alert() in the function).
> How did you manage to solve your problem?[/color]

He didn't if he is trying to over ride the context menu.
Want an IE only no context menu? Use an .hta
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
McKirahan
Guest
 
Posts: n/a
#6: May 3 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


<emmajoh@gmail.com> wrote in message
news:1146588111.611678.10640@u72g2000cwu.googlegro ups.com...

[snip]
[color=blue]
> I just saw you had a similar problem a while ago (it only
> worked whith an alert() in the function).
> How did you manage to solve your problem?[/color]

I presume your referring to my post of 08/24/2004
with a Subject of "Disable right-click without alert?".
(Randy Webb's responses were very informative.)

If you're referring to this code:

<script type="text/javascript">
function click() {
if (event.button == 2) alert("right-click disabled.");
}
document.onmousedown = click;
</script>

it does not disable right-click.

Try it but continue to hold the right mouse button
down and press Enter to acknowledge the alert().
The context menu will then be displayed.


julpero@gmail.com
Guest
 
Posts: n/a
#7: May 10 '06

re: Disabling contextmenu doesn't work in IE since I've installed google bar


Hi, as you can read from
http://groups.google.com/group/Googl...27cd16b6f31511
I've tried to get more information of this problem. No luck... I have
to use GD2.

Closed Thread