The user prints the page either by a keyboard shortcut (ctrl+p) or through the browser's menu. There are no "click this link to print" elements on my page.
With regards to changing the page using JS, there are a variety of things that need to be changed that only seem to with via JS, rather than a custom CSS print-only stylesheet.
For example, a page loads, then the majority of elements fade out. If the user prints this page, the faded-out items do not render. Using a CSS stylesheet (media="print") where all elements' opacity/visibility is set to 1/visible, will not make the elements render when printed. It appears that I need to change the opacity of the elements before the page is actually rendered for print.
Main Topics
Browse All Topics





by: eejonesPosted on 2009-07-06 at 13:22:27ID: 24788863
How does the user choose to print the contents of the window? Do you have a button and onClick() or onSubmit() JavaScript?
How are you changing the page content with JavaScript? Are you using document.write or innerHTML or something else?
If you could paste some code it would help to understand your task.