![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi, im new to this group but ill be direct to the point. im tryin to create a simple webpage that will print the contents of the webpage to a printer on a client side machine. i know the command is ' window.print() ' and that i can have it in the ' onload() ' statement so that the print dialouge appears prior to printing. |
|
here my question. how do i eliminate the Header and Footer information that is automatically generated by the webpage?(i.e. the website name at the top, and the location url at the bottom) |
#3
| |||
| |||
|
|
hi, im new to this group but ill be direct to the point. im tryin to create a simple webpage that will print the contents of the webpage to a printer on a client side machine. i know the command is ' window.print() ' and that i can have it in the ' onload() ' statement so that the print dialouge appears prior to printing. here my question. how do i eliminate the Header and Footer information that is automatically generated by the webpage?(i.e. the website name at the top, and the location url at the bottom) any help appreciated. regards rak |
#4
| |||
| |||
|
|
First, create a style like this ... style type="text/css" !-- @media print{.dontprintme{display:none;}} -- /style Next, whenever you are serving something that you don't want to be printed, place it in a paragraph like this ... (this is my print button by the way) p class="dontprintme" BUTTON TYPE=BUTTON onClick="window.print()" style="width:250px;height:50px;">  PRINT&n bsp </BUTTON p Now, when you run the page, and you click the button, then everything thats NOT within a 'dontprintme' paragraph will not be printed. HTH, PW |
#5
| |||
| |||
|
|
"tigeressal" <cdrakz2000 (AT) mynow (DOT) co.uk> wrote in message news:d55be8e6-f177-4337-b2d2-e5f0eede7ec4 (AT) b64g2000hsa (DOT) googlegroups.com... hi, im new to this group but ill be direct to the point. im tryin to create a simple webpage that will print the contents of the webpage to a printer on a client side machine. i know the command is ' window.print() ' and that i can have it in the ' onload() ' statement so that the print dialouge appears prior to printing. here my question. how do i eliminate the Header and Footer information that is automatically generated by the webpage?(i.e. the website name at the top, and the location url at the bottom) any help appreciated. regards rak First, create a style like this ... style type="text/css" !-- @media print{.dontprintme{display:none;}} -- /style Next, whenever you are serving something that you don't want to be printed, place it in a paragraph like this ... (this is my print button by the way) p class="dontprintme" BUTTON TYPE=BUTTON onClick="window.print()" style="width:250px;height:50px;">  PRINT&n bsp </BUTTON p |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
PW wrote: "tigeressal" <cdrakz (AT) nw (DOT) co.uk> wrote in message news:d55be8e6-f177-4337-b2d2-e5f0eede7ec4 (AT) b64g2000hsa (DOT) googlegroups.com... |
|
rak First, create a style like this ... style type="text/css" |
|
style="width:250px;height:50px;">  PRINT&n bsp </BUTTON p Ah, but what OP want to excluded is not part of his web page that he composed but the URL and date and page numbers that is added by the browser by default. This is a user setting on the browser and is not controllable by the web author...at least with HTML and CSS -- Take care, Jonathan ------------------- |
#8
| |||
| |||
|
|
It is impossible to do via code. It's hard coded into the browser. |
#9
| |||
| |||
|
|
On 12 Apr, 22:12, Ed Jay <ed... (AT) aes-intl (DOT) com> wrote: It is impossible to do via code. It's hard coded into the browser. It's not hard-coded into the browser, it's configurable. Some browsers may have a programming interface that exposes this, and lets you control it. This is likely to be very browser-specific. IE certainly does have this, although it requires COM (ad thus ActiveX). If you use MeadCo's ScriptX control on your page, it's pretty easy. |
#10
| |||
| |||
|
|
But now with MS's attempt at securing IE won't you get a zillion warning dialogs when you invoke such ActiveX? It would hardly be a feasible solution. |
![]() |
| Thread Tools | |
| Display Modes | |
| |