Click here to Skip to main content
14,981,116 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

disable right click in iframe
using javascript or jquery
You can only disable a right click if you take a single-button mouse, of break a mouse...
Maybe you need something else? :-) Again, why?
Sandeep Mewara 2-Mar-13 2:55am
And what happened when you try it?

1 solution

Try this one (but iframed file must be at the same domain):
window.frames["your_iframe_id"].document.oncontextmenu = function(){ return false; };

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900