Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Removing page headers from at the bottom and top of the page while printing the page


Message #1 by "Alen Sabukyan" <alensabukyan@y...> on Mon, 27 May 2002 10:55:10
At least for IE, you can use the 'onbeforeprint' and 'onafterprint' 
event
handlers to hide any divs you don't want to print, and then display 
them
again

-----Original Message-----
From: Alen Sabukyan [mailto:alensabukyan@y...]
Sent: 27 May 2002 11:55
To: javascript
Subject: [javascript] Removing page headers from at the bottom and top
of the page while printing the page


I used the following code but I could only remove the button while
printing the page. I also want to remove page headers and footers from 
at
the bottom and top of the page while printing. How can i do? Thanks in
advance...

<style>
@media print {
     .noprint {
         display: none;
     }
 }
</style>

.... some codes

<DIV class=3DNOPRINT>
<input type=3D"button" value=3D"Yazd=FDr" onclick=3D"window.print()">
</DIV>


---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogram
me
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogram
me
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogram
me
r-20

________________________________________________________________________

Scottish Enterprise Network
http://www.scottish-enterprise.com

Headquarters Address & Contact Numbers

150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel:  +44 (0) 141 248 2700.
Fax:  +44 (0)141 221 3217

 This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised 
recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.



  Return to Index