I have tried most of the solutions to restrict the right click inside the iframe by doing a google search but am able to disable the right for the <div></div>
tag but not able to restrict the right click inside the iframe window.If anybody come up with that process means share your ideas and solutions which helps me alot.This is my code
<html><head>
<script type="text/JavaScript" language="JavaScript">
// http://html-generator.weebly.com/html-right-click-disable-code.html
var tenth = '';
function ninth() {
if (document.all) {
(tenth);
alert("Right Click Disable");
return false;
}
}
function twelfth(e) {
if (document.layers || (document.getElementById && !document.all)) {
if (e.which == 2 || e.which == 3) {
(tenth);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = twelfth;
} else {
document.onmouseup = twelfth;
document.oncontextmenu = ninth;
}
document.oncontextmenu = new Function('alert("Right Click Disable"); return false')
</script></head><body>
<div id="Container">
<iframe id="fraDisabled" src="http://www.stackoverflow.com" style="border: medium none;height: 820px;margin-left: -12px;top:55px;
margin: -15px 0 0 0;clip:rect(46px, 1360px, 750px, -65px);position:absolute;width: 1378px;">
</iframe>
</div>
</body></html>