1

The following works in current Firefox (PDF loads), but not in current IE (page is blank). Any suggestions?

<head>
    <script type="text/javascript">
        function startup() {
            var bubba = document.getElementById('bubba');
            bubba.data = 'http://server.qa/test.pdf';
        }
    </script>
</head>
<body onload="startup();">
    <object id="bubba" type="application/pdf" width="80%" height="800">
      No PDF reader installed
    </object>
</body>

1 Answer 1

2

You won't be able to display the PDF like that. The syntax for including plugins differs between IE and Forefox.

I would recommend using an <iframe> instead of an <object> and using JavaScript to set the iframe's src attribute. This should invoke whichever PDF plugin is installed in the browser, or download the PDF if none is.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.