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

Jun 23rd, 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');

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?

Jun 23rd, 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.