Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

print option in a new window

 
Steph Sam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help if you showed your code.

Eric
 
Steph Sam
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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......
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic