aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes print option in a new window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "print option in a new window" Watch "print option in a new window" New topic
Author

print option in a new window

Steph Sam
Greenhorn

Joined: Dec 09, 2007
Posts: 15
hi all....... i have the following requirement...... in my application i have a print preview link..... when i click that link the contents should get displayed in a new window along with a print option... when i click the print hyperlink it should print the contents of the page.... i used window.open() to open the new window and used document.write() to write the contents into the new window.... i have used a anchor tag inside document.write() to get the print option.... but this is not working fine.... the browser is considering the print link as a string.... can anyone help me solve this???

thanks in advance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
help if you showed your code.

Eric
Steph Sam
Greenhorn

Joined: Dec 09, 2007
Posts: 15
thanks eric....... i have resolved the issue..... when we use document.write in a new window we have use document.open and document.close. I missed that, thats why it didn't work for me......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: print option in a new window