Is it possible to disable right click on an iframe? I know it might be possible if the file in the iframe resides in the same domain,but i was wondering if it could be done if the file in the frame was from an external site?
thanks
Is it possible to disable right click on an iframe? I know it might be possible if the file in the iframe resides in the same domain,but i was wondering if it could be done if the file in the frame was from an external site?
thanks
It's possible, if you create a
div
, and into thisDiv
you have to addz-index
.After configuring
width
,height
, add thefilter:alpha(opacity=50); opacity:0.5;
so, after that, you put a conde into your site blocking the right click...You can't really disable the context menu to begin with. You can only construct fragile barricades to keep people from invoking it. But the fact that this is an external iframe only compounds the issue. No, you can't keep the users from activating the context menu on your iframe. Sorry.
works on IE to disable right click on Iframe but the problem is it does not work with external websites ,,, iframed file must be at the same domain ... take a look on it
No, it's not possible if it's on an external domain. A mouse click or any other event starts at the first, topmost element it fires on and then works its way back up the chain of elements (unless propagation is stopped). If you tried to stop it at the containing document it will have already fired on the relevant elements of the child document.
yes, it is possible to do all following things: disable download, print, save, printscreen, and any button from keyboard to provide security for PDF.
follow my project.....
1 . Install server to run php files ( else use usb portable server ) 2. Create "Pdf_Files" folder in your project and paste your PDF files in it. 3.download pdf.js project 4. write the following codes...
blocked.js
MyIframe.php
myStyle.css
test.php
using this full project you can gives any kind of security for your PDF file even you can block any key keyboard for protection purpose.
steps to perform