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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "print option in a new window" Watch "print option in a new window" New topic

print option in a new window

Steph Sam

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 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

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

Steph Sam

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 and document.close. I missed that, thats why it didn't work for me......
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: print option in a new window
It's not a secret anymore!