I have the following table for example, how do i add print functionality just to the table? And a button that when clicked, the following table is printed via printer
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
You require to create new style sheet print.css and set CSS media=print
for example :
and add class to “yesPrint” to the sections you want to print
Now add a button
for more detatil : http://www.codeproject.com/KB/HTML/Printing_with_CSS.aspx