| Author |
Printer friendly page with javascript
|
raghavendra pola
Greenhorn
Joined: Jan 18, 2007
Posts: 11
|
|
Hi guys ,
I have following page to display the printer friendly page of a current page using javascript
the following is the javascript
The problem is that after displaying the printer frriendly page , the focus is shifting back to main window from print friendly window.
So when window.print happens , it is printing the main window instead of printing the printer friendly window.
Can somebody please help me with this .
|
perfection is making best effort within constraints of space ,time and resources
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56180
|
|
Put the print operation in the sub-page.
P.S. There are better ways to create printer-friendly pages. Look up CSS print media.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
should be
You really do not need to use JavaScript, you can learn about CSS Print Media
Eric
|
 |
 |
|
|
subject: Printer friendly page with javascript
|
|
|