Skip to main content

Printing contents of a textarea

1 reply [Last post]
Joined: 2006-02-17

I have a servlet that puts information in a textarea box. The text is sometimes long and has scroll arrows. I want have the user print the contents of the box. Of course, if they use Internet Explorers File Print it only prints what is on the screen. Is there a function or user friendly print button that I can put in my servelt code to allow the user to print the entire contents of the box? Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shane Whitehead
Joined: 2006-02-17

The only solution that comes to mind, is to have a button on your generated page that would open a new window and load the entire contents of the textarea into that window as plain HTLM or text.

You could then provide some javascript or allow the user to print the information...

The only other solution that I can think of is to have a small appelt that is loaded with the some data that could print the document for you, but you're most likely going to run into security issues...

Happy Coding...