title: Prevent right click on <iframe> where an iframe contains PDF file in Internet Explorer(IE strictly)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4930914/prevent-pdf-file-from-downloading-and-printing">Prevent PDF file from downloading and printing</a>  </p>
  </blockquote>
  
  
  
  <p>I kow we have lots of post to prevent right click on ,</p>
  
  <p>here i'm trying to have an  containing PDF where user cannot right click on the pdf for Internet Explorer browser.</p>
  
  <p>The basic idea is to prevent user from copying or printing the pdf file.</p>
  
  <p>I have done following code it works on chrome, but fails badly on IE. 
  FYI - PDF file is on same Domain</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Disable Context Menu&lt;/title&gt;
  &lt;script type="text/jscript"&gt;
    function disableContextMenu()
    {
      window.frames["fraDisabled"].document.oncontextmenu = function(){alert("Right Click disabled!"); return false;};   
      // Or use this
      // document.getElementById("fraDisabled").contentWindow.document.oncontextmenu = function(){alert("Right Click disabled!"); return false;};;    
    }  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body bgcolor="#FFFFFF" onload="disableContextMenu();" oncontextmenu="return false"&gt;
  &lt;iframe id="fraDisabled" width="528" height="473" src="landscape.pdf#toolbar=0&amp;navpanes=0" onload="disableContextMenu();" onMyLoad="disableContextMenu();"&gt;&lt;/iframe&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Or is there any other to protect your pdf file working on IE ?</p>