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

print a selection

Status
Not open for further replies.

cooljules22

Technical User
Feb 14, 2003
3
GB
Is it at all possible to print a selection from a single html document using javascript i.e. i wish, by pressing the print button, to be able to print a specific section of the page only.

Thankx in advance
 
Not easy with javascript I think.

One option i saw recently was to have the block of text contained in a word document and when the print button is clicked the word document gets printed rather than the full HTML document. Didn't work so well IMO, anyway you'll find the code on
It's probably possible with CSS, define styles for Print where you could "hide" the text you didn't want printed. The problem I got with this was that I was getting lots of blank space printed too which I didn't find a solution for. Worked ok apart from that.

The best option would be to use server side includes, php or some cgi script.


É ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top