C
colinzhu
I want to have the print dialog shown automatically after the the page
is loaded, but when I try to call window.print() BEFORE the iframe,
the print dialog is not shown at all. Anyone can help?
Here is my code:
<html>
<head>
<title>Auto print the page</title>
</head>
<body>
****** The area in my control START *******
text
text
<script type="text/javascript">window.print()</script>
****** The area in my control END *******
other content out of my control
<iframe src=""></iframe>
</body>
</html>
Please note:
1. For some reasons <body onload="window.print()"> is not allowed,
it's out of my control
2. The print dialog should be shown without any other action e.g.
click. So onclick="window.print()" is not allowed.
3. The entire page should be printed, so ExecWB(6,1) &
execCommand("Print") are useless, because they only print the content
BEFORE the calling of ExecWB(6,1) or execCommand("Print")
4. The <iframe> should not be removed or changed, it's out of my
control.
5. It works in Firefox
is loaded, but when I try to call window.print() BEFORE the iframe,
the print dialog is not shown at all. Anyone can help?
Here is my code:
<html>
<head>
<title>Auto print the page</title>
</head>
<body>
****** The area in my control START *******
text
text
<script type="text/javascript">window.print()</script>
****** The area in my control END *******
other content out of my control
<iframe src=""></iframe>
</body>
</html>
Please note:
1. For some reasons <body onload="window.print()"> is not allowed,
it's out of my control
2. The print dialog should be shown without any other action e.g.
click. So onclick="window.print()" is not allowed.
3. The entire page should be printed, so ExecWB(6,1) &
execCommand("Print") are useless, because they only print the content
BEFORE the calling of ExecWB(6,1) or execCommand("Print")
4. The <iframe> should not be removed or changed, it's out of my
control.
5. It works in Firefox