| | |
No page header and footer when printing a web page
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hihi,
is there a way to rid of the page header (usually it's the page title and url) and the page footer (usually it's the page number and date) without having user to change from the web browser's the page setup ?
Can this be done using javascript or just html meta tags?
Also we control the contents of what is printed from a web page without having to redirect the page? Example, I have three paragraphs on a web page and I don't want the middle paragraph to be printed.
thanks
is there a way to rid of the page header (usually it's the page title and url) and the page footer (usually it's the page number and date) without having user to change from the web browser's the page setup ?
Can this be done using javascript or just html meta tags?
Also we control the contents of what is printed from a web page without having to redirect the page? Example, I have three paragraphs on a web page and I don't want the middle paragraph to be printed.
thanks
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
Research the CSS Print Profile: http://www.w3.org/TR/2004/CR-css-print-20040225/
hi,
thanks for your reference given but i still can't get it rite. i tested by including this in a cascading style sheet.
@page {
@top-left{
font-family: Helvetica, Arial, sans-serif;
font-size: 18pt;
font-weight: bolder;
content: "XHTML-Print: A Proposal --- August 25, 2000";
}
}
by right, this should print out "XHTML-Print: A Proposal --- August 25, 2000" on the top left of the page right. but it doesn't. This is just testing. Anyway, my problem is I want to get rid of the header and footer without having to change it using the page setup of the browser. by the way, i'm using mozilla browser.
please help.
thanks for your reference given but i still can't get it rite. i tested by including this in a cascading style sheet.
@page {
@top-left{
font-family: Helvetica, Arial, sans-serif;
font-size: 18pt;
font-weight: bolder;
content: "XHTML-Print: A Proposal --- August 25, 2000";
}
}
by right, this should print out "XHTML-Print: A Proposal --- August 25, 2000" on the top left of the page right. but it doesn't. This is just testing. Anyway, my problem is I want to get rid of the header and footer without having to change it using the page setup of the browser. by the way, i'm using mozilla browser.
please help.
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
The headers and footers are put there by your printing subsystem, not by the page or the browser. What that means is, this particular attribute is in the hands of the user. Much like screen resolution or brower width. I always find it irritating when programmers try to override my perceived control.
hi tgreer,
thanks for your time and info so far. sorry, if anything i asked irritated you.
I've got further questions though. If lets say i'm doing a web application (using PHP) in a closed environment, when a user submit a form for example, the info is sent to the server. On the server, the necessary processing is done and the content is sent by the server to the right printer to print. How do I get about to do this?
In this case can the page to print be processed automatically without the header and footer before being sent to printer ?
thanks for your time and info so far. sorry, if anything i asked irritated you.
I've got further questions though. If lets say i'm doing a web application (using PHP) in a closed environment, when a user submit a form for example, the info is sent to the server. On the server, the necessary processing is done and the content is sent by the server to the right printer to print. How do I get about to do this?
In this case can the page to print be processed automatically without the header and footer before being sent to printer ?
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
Don't misunderstand me, your POST didn't irritate me at all.
Your server can print to a printer attached to the server. You can't force something to print on the users printer.
The headers and footers are put there by the operating system's printing subsystem. It's not something you can control with a scripting language.
Your server can print to a printer attached to the server. You can't force something to print on the users printer.
The headers and footers are put there by the operating system's printing subsystem. It's not something you can control with a scripting language.
initially, i had hoped this could be done with javascript, so i posted the question here. Anyway, I did post a similar question in the PHP forum at this link http://www.daniweb.com/techtalkforums/thread15881.html .
I know ASP and PHP but on this assignment I have to use PHP. So, ... PHP it is.
I know ASP and PHP but on this assignment I have to use PHP. So, ... PHP it is.
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: a weird Javascript error
- Next Thread: how to pass a array from asp to javascript
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug captchaformproblem checkbox close codes createrange() css cursor debugger dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position programming progressbar prototype redirect regex runtime safari scale scriptlets search security select size software sql text textarea unicode w3c window windowofwords windowsxp wysiwyg \n






