View Full Version : print
I want to open it on click:
function xyz()
{
var printPage = window.open('xyz.htm');
printPage.blur();
printPage.print();
setTimeout(printPage.close(),600);
}
calling this function onclick. It is working onlything throwing error invalid argument on setTimeout
Skyzyx
04-17-2003, 06:30 AM
It should be setTimeout("printPage.close()", 600);
i can not give printPage in double" b'coz printPage is variable
Skyzyx
04-17-2003, 07:08 AM
That's the way that setTimeout() functions. Sorry.
u mean this is not possible with settimeout
is there any other solution for this
what is the opposte of window.opener
can snybody say
david7777
04-17-2003, 10:13 AM
Originally posted by Skyzyx
It should be setTimeout("printPage.close()", 600);
Skyzyx is right - this is how you do it, and it works like this!
Just try it and see...:D
I tried it againg but not working giving javascript error that printPage is undefined
david7777
04-17-2003, 12:32 PM
Try this:
var printPage;
function xyz()
{
printPage = window.open('xyz.htm');
printPage.blur();
printPage.print();
setTimeout("printPage.close()",600);
}
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.