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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to print only a section of website 1

Status
Not open for further replies.
Feb 20, 2002
64
US
okay, i went to support.microsoft.com and i notice in their knowledgebase articles there is a PRINT button pointing to a PrintContents() function.

When I click on this PRINT button and print the document, it only prints the article information and not the header, footer, and menu stuff in the page.

Can anyone shed any light on how exactly they are doing this? and if so, how do you do this?

Thanks
 
you can use css to define what should print or not

thread216-575718


=========================================================
try { succeed(); } catch(E) { tryAgain(); }
-jeff
 
Presumably the function printcontents() is on the M$ website. There are a couple script scources in the header area that appear to point to their site.

<script language=&quot;Javascript&quot; SRC=&quot;/common/script/gsfx/xxxxx.js&quot;></script>

This might not be secretiveness, but rather they might rebuild the page without the menus so that what is sent to the printer is not so cluttered. Whatever, we don't see the printing code anyway.

As an alternative, you may want to set up your print button to be another link to a parallel version of the page in question but one which does not display menus, etc. so that the &quot;Print&quot; page is built simpler.
 
jemminger, I stand corrected. M$ does indeed use that method. (I started answering when no one else yet given an answer.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top