Aleks
asked on
Print an element of the screen
I currently have code to print the entire screen of a report, but it includes nav bar and buttons that the end user doesn't want. what they want printed is the table.
The table has an ID, it is :
<table width="100%" class="tablesample" id="results">
<a href="#" onClick="window.print();re turn false" title="Print"><img src="../../../Images/print s.gif" width="25" height="20" alt=""/></a>
How can I modify the code about so that it only prints the object with id = 'results' ?
The table has an ID, it is :
<table width="100%" class="tablesample" id="results">
<a href="#" onClick="window.print();re
How can I modify the code about so that it only prints the object with id = 'results' ?
ASKER
Ummm .. ok I guess. Thought there would be an easier way to do by simply printing a specific object instead of blocking those which I don't want
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I know .. what I meant was I thought there could be a parameter passed to the 'print' action so it would print that one element and not ALL which is what it does by default.
I have a DW extension that does this but prints to PDF or Excel, not to printer :#
I have a DW extension that does this but prints to PDF or Excel, not to printer :#
ASKER
Actually they do have an extension for that ... what do you know ... thanks for the help tho.
https://www.experts-exchange.com/questions/28635559/Add-logo-when-printing-from-browser.html
you'll need to add a "print" css stylesheet that you will set which objects on your page you want to print.
you're other option is to redirect the user to a printer friendly page, which is a page that only has what you want printed on it.
I would go with the first option if it was me...