/    Sign up×
Community /Pin to ProfileBookmark

Remove right mouse button

How can I remove the right mouse button click on a certain image or a button?

to post a comment
JavaScript

12 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterApr 29.2005 — [color=royalblue]<input type="button" oncontextmenu="return false">[/color]


Cheers!
Copy linkTweet thisAlerts:
@gebezisauthorApr 29.2005 — Thank you very much!

Best regards
Copy linkTweet thisAlerts:
@felgallApr 29.2005 — Of course browsers such as Opera completely ignore such unreasonable requests.
Copy linkTweet thisAlerts:
@UltimaterApr 29.2005 — So what, you can't prevent your user from downloading your images in any case.
Copy linkTweet thisAlerts:
@gebezisauthorApr 30.2005 — No, I just have a site made of 3 frames (the menu is in the left frame, the content opens in the central frame) and if you click with the right mouse button on a button from the left frame and click on "open in new window" the central frame would open in a separate window without the other frames - that's what I don't want to happen.

I don't find this unreasonable.

Thank you anyway....
Copy linkTweet thisAlerts:
@scragarApr 30.2005 — use a frames forwarder:

[code=php]<script type="text/javascript"><!--
if(window.self == window.top){
window.top.location.href = "indexpage location";
};
//-->
</script>[/code]
Copy linkTweet thisAlerts:
@gebezisauthorApr 30.2005 — I can't understand this completely.

The indexpade opens a top frame with the logo, a left frame with the buttons and a central frame with the context.

Imagine that there are 2 buttons on the left frame: "home" and "links".

The index page opens the home.htm page in the central frame. So if I use this script in the links.htm page and you click on the "links" button with your right mouse button and "open in new window" the index page with the home.htm page in the central frame would open and not with the links.htm page.

Maybe I don't understand you very well. I'm somewhat new to JavaScript.

The site I'm talking about is at http://www.swan-multimedia.co.uk - HTML version.
Copy linkTweet thisAlerts:
@CharlesApr 30.2005 — I don't find this unreasonable.[/QUOTE]Well I do. It's my browser and my screen and I'll do with it what I like. If your such a control freak then publish in PDF.
Copy linkTweet thisAlerts:
@gebezisauthorApr 30.2005 — Well I do. It's my browser and my screen and I'll do with it what I like. If your such a control freak then publish in PDF.[/QUOTE]

I guess you didn't understand my point.

I don't insist on denying the right mouse button - if you read my previous postings. I just want to keep the frames with the menu on every page for better user control. I would appreciate an advice in this direction. Of corse if you want to see a site in a way it is not supposed to work - it is your right...
Copy linkTweet thisAlerts:
@CharlesApr 30.2005 — Design each page so that it works out of context, so that each one stands on its own without the frameset.
Copy linkTweet thisAlerts:
@gebezisauthorApr 30.2005 — It can stand on its own but the user would lose the navigation without the menu..

Anyway I'll find a way...
Copy linkTweet thisAlerts:
@CharlesMay 01.2005 — It can stand on its own but the user would lose the navigation without the menu..

Anyway I'll find a way...[/QUOTE]
Then it can't stand on its own. You need a redundant navigation on each page.
×

Success!

Help @gebezis spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...