...

View Full Version : open a new window and print it problem



beedie
06-23-2008, 12:49 PM
I am using this function to open a window and print the contents of the file.:


function printit()
{
var a = window.open('draft.php','draft','width=550,height=600');
a.print();
}


The window opens fine and opens the print window but returns a print error saying 'the page was replaced while trying to print' when I click print. Any ideas?

tomws
06-23-2008, 10:56 PM
I've not attempted to do window opening and printing before, but I'm wondering if your problem might be that your new window isn't yet loaded when the print command tries to execute.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum