Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing with asp 1

Status
Not open for further replies.

notepad

Programmer
Sep 18, 2001
7
0
0
LK
Can i use javascript to print the contents of a html table only?
When i use the window.print() method it prints the whole page including the print button.Can anybody help me please ?
Thanks..
 
Not sure if this is the best way to do this but I when printing I would redirect to a print page which contains nothing but the table you want to print. Call the windows.print function and then redirect back to the original page.

Check out this page for some very useful info.
 
I guess this is an ASP created Table right? As a refinement to using another window, Internet Explorer can use this:

<LINK REL=ALTERNATE MEDIA=PRINT href=&quot;printablePage.htm&quot;>

You could make use of this, if you wrote that page dynamically - this page is printed automatically when window.print() is invoked.

This will involve a little bit of work writing and saving the printable page to your server, but the bonus is you don't get a pop-up. Just an idea.
;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top