[Javascript] problem to print embdad pdf which is in object tag in Fire fox
Philip Thompson
philthathril at gmail.com
Mon Jul 12 08:27:16 CDT 2010
On Jul 12, 2010, at 5:58 AM, vivek joshi wrote:
> Hi All
>
> can any one please help me. i am not able to print embaded pdf in
> FireFox ,the same code is working fine in IE ,the code is given below
>
>
>
> <html>
> <head>
> <script>
> function doit() {
> //alert("x");
> var x=document.getElementById("doodad");
> //alert(x);
> //x.click();
> //x.setActive();
> //x.focus();
> //window.parent.frames["a"].document.getElementById("doodad").print();
> x.print();
> }
> </script>
> </head>
> <body>
> <frameset rows='*' framespacing='0' border='0' frameborder='0'>
> <frame id="topframe" name="topframe">
> <object id="doodad" data="
> http://bnbussys4web1.pb.com/images/LabelToPDF.pdf#toolbar=0&navpanes=0&scrollbar=0"
> type="application/pdf" width="500" height="500">
> </object>
> <button onclick="doit()">click</button>
> </frame>
> </frameset>
> </body>
> </html>
First, you should probably filter the extra junk out of your example... people don't want to have to wade through it to find what the issue is. Second, you can't have a "body" tag and a "frameset" tag in the same file (unless you include a body tag within a "noframeset" tag). I don't think this will necessarily fix the issue you're having, but try cleaning it up first.
~Philip
More information about the Javascript
mailing list