faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 34 people (50%) answered Yes
Recently 5 of 10 people (50%) answered Yes


Why doesn't window.print() work in a child window which is opened using the window.open method

Mar 6th, 2004 23:23
Gerry Baldwin, Guest,

<TITLE>Print Child Window</TITLE>
function printChildWindow() {
	var newWindow = window.open
("newWindow.html", "newWindow", "height=200,width=300");
Daughter</TITLE></HEAD><BODY><CENTER><BR><BR>This is some 
data.<BR><BR><BR><INPUT TYPE="button" NAME="print" VALUE="Click to 
Print" ONCLICK="window.print()"></CENTER></BODY></HTML>');
	newWindow.document.close(); //This is the key!!!
<INPUT TYPE="button" VALUE="Click to Create New Window"