Discussion Locked

How to Control Printing of HTML Document

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there any way to control the pagesetup of any browser,like Header or Footer? That is i would like to set header and footer for the document programmatically before i print a HTML document.

9 replies

by puneetkuthiala

Using Javascript I think you can do it. I have seen it working. In fact I am not from Web Development so I am extremely sorry for not giving you the deatils. In fact one of my colleague who has left us had done it.
Hope I was os any help.
regardsPuneet

by mo_mdpc

I have created an ActiveX component that will do it for IE4+, but it appears that Netscape does not allow access to these fields.
The ActiveX control takes javascript funtion argument and sets the registry when the page loads. I am releasing it as shareware with some other HTML functions. (I am not self-promoting here. I will be glad to help other TR members)

by rajadayalan

Hi,
You can set Header and footer for html pages using javascript. I just found the information from the following page http://www.infohiway.com/javascript/headfoot.htm. For your easy reference i have given the coding from the page here.

Simple Headers and Footers

There are many ways of putting a header and footer on an HTML page, but this is one of the easiest. Once you have set up header.js and footer.js, all you need to do to include a header is put this code at the top:

And all you need to do to include a footer is put this code at the bottom:

WARNING 1!!! Only Netscape 3 and higher and MSIE 4 and higher support external scripts (usage of the script src).

WARNING 2!!! In order to use the .js extension it must me enabled in the Web Server software of the machine where it is operating. This means that you must know how to map files with the .js extension to a MIME type of

by rajadayalan

Hi,
You can set Header and footer for html pages using javascript. You can find the information from the following page http://www.infohiway.com/javascript/headfoot.htm. For your easy reference i have given the coding from the page.

Simple Headers and Footers

There are many ways of putting a header and footer on an HTML page, but this is one of the easiest. Once you have set up header.js and footer.js, all you need to do to include a header is put this code at the top:

And all you need to do to include a footer is put this code at the bottom:

WARNING 1!!! Only Netscape 3 and higher and MSIE 4 and higher supportexternal scripts (usage of the script src).

WARNING 2!!! In order to use the .js extension it must me enabled in the Web Server software of the machine where it is operating. This means that you must know how to map files with the .js extension to a MIME type of:

This discussion is closed to new replies.