473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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

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!!!

May 2 '06 #1
6 1794
em*****@gmail.com said the following on 5/2/2006 12:15 PM:
Hi

I'm trying to disable IE contextmenu (on a right click) as I want to
create my own.
Another one re-inventing the wheel?
The problem is that since I've installed the latest version of the
google desktop, the script doesn't work.
Hmmm. Uninstall the Google Desktop......
No other script I found on the Internet is working anymore.
Most didn't work to start with that messed with the context menu.

<snip>
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...


It does? Not for me.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 2 '06 #2
<em*****@gmail.com> wrote in message
news:11*********************@v46g2000cwv.googlegro ups.com...
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:


Have you tried:

<body oncontextmenu="return false">
May 2 '06 #3
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?

May 2 '06 #4
em*****@gmail.com said the following on 5/2/2006 12:41 PM:
I have tried that now but it doesn't work
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/ >
I though writing <script>document.body=noRightClick;</script> was
the same anyway (where the function noRightClick() returns false).
No. It is not even close. What do you think setting the document.body to
a reference to a function is supposed to do?
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?


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/
May 2 '06 #5
<em*****@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...

[snip]
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?


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.
May 3 '06 #6
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.

May 10 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

52
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable...
0
by: Stefan | last post by:
I've a weird problem. I use a contextmenu to do some staff after clicking the contextmenuitem. all works fine on my pc (win2k). If the application runs on the customers pc (NT4) the contextmenu...
1
by: Brian Martel | last post by:
I am trying to create a dynamic flyout submenu off of a contextmenu. I can right click and get the base contextmenu ok. On the Popup event I add MenuItem's to the collection of one of the items so...
2
by: Zieben | last post by:
Hello! I have such problem! I have my UserControl. I override property ContextMenu for this Control as ..... new ContextMenu ContextMenu{ set {_contextMenu = value;}
0
by: cemino | last post by:
Hi, I got a problem with ContextMenu. I'm using a hot-key (like Ctrl-B) to show contextMenu in my program. Things is like below: contextMenu.Show(Form1, New...
7
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To...
0
by: Jaime Lucci | last post by:
Hi everyone! I'm using an ActiveListBar control which is a COM Component. I´ve associated a context menu to it by the show method of my context menu: contextmenu.Show(activelistvar,position),...
11
by: Graham Charles | last post by:
I'm writing a control inheriting from ComboBox, and I'd like to add an entry to the ContextMenu for that combo box. I have no problem if I create an entirely new ContextMenu from scratch, but I'd...
2
by: eBob.com | last post by:
I've been working on an app which has an array of RichTextBoxes. And I have a context menu for the RTBs. The context menu has two levels; the first level has two items, "Load Sample Text File"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.