Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2007, 02:46 AM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to print PDF from a child window

How can i print a PDF popup in javascript.The PDF popup is opened as new window from its parent then follows a print dialog box.Can anyone tell me how i can do this in javascript without getting a Permission/Access denied in IE 7

 
Old September 20th, 2007, 02:52 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Disto!!
try this ,
windowname.print();
where windowname is ur popup windowname that contains pdf file

Cheers :)

vinod
 
Old September 20th, 2007, 02:59 AM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks vinod but thats where the problem sets in.Here is the code
popWin = window.open('subsoffer.pdf','popUp','top=0,left=0, height=700,width=1000, resizable=yes, scrollbars=0, menubar=0');
        popWin.focus();
        setTimeout("popWin.print();",5000);
This looks fine to me and it works well in firefox but I get a Permission denied error in IE 7.I want this to work in IE 7 and stop having the bloody Permission denied.Do you have any idea?

 
Old September 20th, 2007, 05:04 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hi Disto!!

http://www.jibbering.com/faq/

point>.4.19 Why do I get permission denied when accessing a frame/window?


Also visit
http://www.ie-vista.com/kbase3.html

Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
not able to print out the child nodes eruditionist XSLT 7 October 30th, 2008 10:33 AM
Closing parent window from child window arnabghosh Javascript How-To 1 December 26th, 2007 01:18 AM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM
Printing a child window (containing a pdf) nickodemus Javascript How-To 0 October 8th, 2003 06:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.