General discussion

Locked

How to Control Printing of HTML Document

By jamlove ·
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.

This conversation is currently closed to new comments.

9 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

How to Control Printing of HTML Document

by puneetkuthiala In reply to How to Control Printing o ...

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

Collapse -

How to Control Printing of HTML Document

by jamlove In reply to How to Control Printing o ...

The question was auto-closed by TechRepublic

Collapse -

How to Control Printing of HTML Document

by mo_mdpc In reply to How to Control Printing o ...

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)

Collapse -

How to Control Printing of HTML Document

by jamlove In reply to How to Control Printing o ...

The question was auto-closed by TechRepublic

Collapse -

How to Control Printing of HTML Document

by rajadayalan In reply to How to Control Printing o ...

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:

<script language="JavaScript" src="header.js"></script>

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

<script language="JavaScript" src="footer.js"></script>

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

Collapse -

How to Control Printing of HTML Document

by jamlove In reply to How to Control Printing o ...

The question was auto-closed by TechRepublic

Collapse -

How to Control Printing of HTML Document

by rajadayalan In reply to How to Control Printing o ...

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:

<script language="JavaScript" src="header.js"></script>

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

<script language="JavaScript" src="footer.js"></script>

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:

Collapse -

How to Control Printing of HTML Document

by jamlove In reply to How to Control Printing o ...

The question was auto-closed by TechRepublic

Collapse -

How to Control Printing of HTML Document

by jamlove In reply to How to Control Printing o ...

This question was auto closed due to inactivity

Back to Web Development Forum
9 total posts (Page 1 of 1)  

Software Forums