0

I tried to load PDF file in IFrame. it is working with FF and Chrome but does not load in IE. IE asking to save or open to file instead of load in IFrame. I am loading file using javascript.

I am using following code :

<html>
<head>
<script type="text/javascript">
function setPDF() {
    var iframe = document.getElementById('iframe1');
    iframe.src = "pdffile/sample1.pdf";
}
</script>
</head>
<body>
<iframe id="iframe1"></iframe>
<input type="button" value="Click" onclick="setPDF();" />
</body>

</html>

Please suggest me

Thanks

  • We can best help you if you include your relevant code directly into the question. Please read [How to Ask](http://stackoverflow.com/questions/how-to-ask) to learn how to improve your question. Then [edit](http://stackoverflow.com/posts/27779654/edit) your post. – honk Jan 05 '15 at 12:47
  • ok I have add code as you told me. please tell me if you want any more information. – user2226958 Jan 05 '15 at 12:54
  • Please refer this http://stackoverflow.com/a/12974315/795683 – Sain Pradeep Jan 05 '15 at 13:02
  • Yeah I also tried with PDFObject but it did not work as well with IE that's why i replaced with IFrame but still it does not work with IE. This time IE is asking for save and open file instead of display file. – user2226958 Jan 05 '15 at 13:05
  • http://stackoverflow.com/questions/19654577/html-embedded-pdf-iframe –  Jan 06 '15 at 01:46

0 Answers0