To do this you need to isolate the table to be printed. There are three
ways to do this:
1. Wrap all other content on the page in div tags with a style that won't
display on print media
<style media="print">
.noPrint {
display: none;
}
</style>
<div class=noprint>
content...
</div>
<table>
stuff to print...
</table>
This would of course mean that the table would be the only thing to print.
2. Write a javascript routine that upon clicking the button on the page
loops through all the divs on your page and sets their class to "noPrint",
calls print, then resets the classes.
3. (by far the simplest way) Open a new window with just the table in it,
and close it immediately after printing.
There are plenty of resources on the net for each of these methods, some of
which are browser specific.
--
William Morris
Semster, Seamlyne reProductions
Visit our website,
http://www.seamlyne.com, for the most comfortable
historically inspired clothing you can buy!
"Alon" <no****@hotmail.com> wrote in message
news:1082031867.186373@sointsocks...
Hi,
I want to send a table that exist in my page to the printer, without
opening a new window.
Is it possible?
If it is not possible to do this in javascript, can I do it with JSP?
Thanks,
Alon