samobellows
Programmer
Hello, and thanks in advance for helping me out here.
the project i am working on is a web based form that basically takes information from a form, and among other things, generates a printer friendly version of the information on the form.
the user fills out the form, and when they click the "printer friendly version" button, the div tag that has the form in it stays visible, but the div tag that holds the printer friendly information which was hidden, is toggled to visible, and positioned on top of the form.
before the printer friendly div pops up, i generate the innerhtml with a javascript from the data in the web form, so that when the hidden "printer friendly" div becomes visible, the information in it is what the user entered from the form.
now, i need to print that printer friendly version, without printing the rest of the page.
things i've tried:
a straight up window.print will print the whole page,including banner adds and all that. i need just the "printerFriendly" div tag to print.
a CSS "@media print" came close, i got that to only print the div tag i wanted, but all of the javascript variables are lost, because this method reloads the page, and on a fresh load, the "printerFriendly" div tag is empty
i cannot use a window.open to accomplish this, due to client requesting no popups.
Any hints or suggestions to clear the way will be greatly appreciated, i hope this post isn't too much a wall of text. thanks again!
the project i am working on is a web based form that basically takes information from a form, and among other things, generates a printer friendly version of the information on the form.
the user fills out the form, and when they click the "printer friendly version" button, the div tag that has the form in it stays visible, but the div tag that holds the printer friendly information which was hidden, is toggled to visible, and positioned on top of the form.
before the printer friendly div pops up, i generate the innerhtml with a javascript from the data in the web form, so that when the hidden "printer friendly" div becomes visible, the information in it is what the user entered from the form.
now, i need to print that printer friendly version, without printing the rest of the page.
things i've tried:
a straight up window.print will print the whole page,including banner adds and all that. i need just the "printerFriendly" div tag to print.
a CSS "@media print" came close, i got that to only print the div tag i wanted, but all of the javascript variables are lost, because this method reloads the page, and on a fresh load, the "printerFriendly" div tag is empty
i cannot use a window.open to accomplish this, due to client requesting no popups.
Any hints or suggestions to clear the way will be greatly appreciated, i hope this post isn't too much a wall of text. thanks again!