I'm trying to print web-based forms, some of the forms are more than one page so I would like some basic, identifying information to be displayed in a header or footer on the pages. I don't know where the browser is going to do a page break as the forms can be varying lengths depending on how much text users enter.
Is there any way to set the text in a header/footer? I'm generating my html with a php script, running on a Windows server.
Since you're using PHP, check out its include() function. That's probably what you are after.
I don't think that's what SteveD is looking for. I think he's looking for a way to put a common header/footer on each printed page.
I don't know of a way to do what he wants to do.
This sounds like more of an issue with a browser setting than a scripting/coding issue. You can change headers/footers in your browser before printing:
--- IE 7 ---
1. File > Page Setup...
2. Make modification to Header and Footer
a. It appears that &p represents current page and &P represent total pages
--- FF 2 ---
1. File > Page Setup...
2. Go to the 'Margins & Header/Footer' tab
3. In the 'Headers & Footers' section select the information you would like to display.
Hope this is what you are aiming for help on...
No, I'm trying to print html forms from data in a database. So if there are 5 entries in the database I'll get 5 forms printed out. I have an html formatted form so I get one long listing on the computer monitor, which is ugly, but printed out the administrator will get these nicely laid out paper forms.
Since each form may be 2 or more pages long, I'd like to have a unique identifier at the top or bottom of each printed page just to keep them all organized. I was hoping there was a simple CSS or html type of a setting/tag that would change the browser header/footer, or display a text string at every page break.
Ahh....I understand now. Well, I'm with Darin...I've never seen anything like this. The issue is that the browser is the one deciding the page breaks, but by then it is too late to do anything with CSS.
Is this an inhouse thing? That is, can you control what browser will be used to print out the forms? because if you can avoid MSIE I think it's possible.
If you have a useable TITLE that identifies the form you can make the title visible on the page by making HEAD and TITLE 'display: block'. Or you could use generated content.
You might use a table, since some browsers let THEAD and TFOOT elements repeat on each new paper: http://css-discuss.incutio.com/?page=PrintingTables
Another idea might be to let CSS control where a page should be broken, and add the "identifying information" there: http://www.w3.org/TR/CSS21/page.html#page-breaks
The <THEAD> works great with Firefox, no go with IE 7. It's an internal application and I know the two users of the program. One uses Firefox, the other I'm not sure - I'll persuade her to use Firefox!!
Thanks for the help - I learn something new every day.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)