0

I have a .gsp file where I have 2 forms containing a button for print. I need to print out a page using the information using 2nd form content when print button is pressed. How can I do this?

1 Answers1

1

On click of the print button, you can populate a hidden div with the form information. Then using a CSS print stylesheet (using media queries), you can format that div to print the information as you see fit.

If you are looking to popup the print dialog on click, then use window.print() in your javascript code.

aldrin
  • 4,482
  • 1
  • 33
  • 50
  • Actually I don't want to print the whole page to print. I want to print a small portion or some information from the form contents. – user3068589 Dec 05 '13 at 05:05