0

hello ,
I have a problem......
I actually have a servlet ... and this servlet actually retrieves the values from my database and displayes them in a table. All this works fine... but now ,below this table , i want to have button saying " Print this Page" , so that when i click this button, i need an hard copy of the page..... i actually do not know how to write the code for activating the printer and printing the web page content when i click this button....could anyone please give me a clue.....

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by Rhyan
0

hello ,
I have a problem......
I actually have a servlet ... and this servlet actually retrieves the values from my database and displayes them in a table. All this works fine... but now ,below this table , i want to have button saying " Print this Page" , so that when i click this button, i need an hard copy of the page..... i actually do not know how to write the code for activating the printer and printing the web page content when i click this button....could anyone please give me a clue.....

Put the following on your page:

<input type="button" value="Print this page"
onclick="window.print()" />
That is all...
Good luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.