Overwrite default page settings in IE when printing

admin

Administrator
Staff member
I've created a simple on-line form which is designed to be printed. It fits just right on the page, and looks just right, except that when it prints, it always takes the default IE settings from File, Page Setup for the header and footer. All the users are using IE5.5 and higher.<br />
<br />
I simply want the users to print this form without having to manually clear the header and footer settings in IE. I feel sure there must be some script that I can add to my page to accomplish this, but after a weekend fruitless search I've found nothing and now need to turn to you guys.<br />
<br />
Does anyone have any ideas? I'm a relative newcomer to html, so a simple explanation as to how to achieve this would be greatfully received (and rewarded with a beer if you happen to be in the Mayfair area of London ;-) )<br />
<br />
Many thanks,<br />
Gav:confused:<!--content-->well you can look into @media I think in css, but othere than that I don't think it will be an option.<!--content-->like this Scoutt?<br />
<br />
<link rel="alternate" media="print" href=http://www.htmlforums.com/archive/index.php/"differentpage.html"><br />
<br />
...that won't change the header/footer, though. not that i know of, unless ya put the script on the other page, if there even is a script for that. let me look around.<br />
<br />
OH! ...nevermind... looks like there is a veritable wealth of scripts out there for this!<br />
<br />
<!-- m --><a class="postlink" href="http://google.yahoo.com/bin/query?p=javascript+print+page+without+header+footer+information&hc=0&hs=0">http://google.yahoo.com/bin/query?p=jav ... &hc=0&hs=0</a><!-- m --><!--content-->The links from yahoo will give you an activex solution, which is alright in an intranet where you can just push it out to the workstations. But bee warned that you have to be careful with anything that messes with the registry settings. <br />
<br />
One of my clients had to fix the registry on 800 workstations because of an error in an activex print function that was supposed to change the footer to a copyright notice.<!--content-->Many thanks for the responses - I knew I could rely on you guys ;-)<br />
<br />
The solution was found at:<br />
<br />
<!-- m --><a class="postlink" href="http://developer.irt.org/script/1437.htm">http://developer.irt.org/script/1437.htm</a><!-- m --><br />
<br />
The only problem is that you do need to Download <!--more--> the ActiveX controls to all PCs. This is available for free for this particular problem from:<br />
<br />
<!-- m --><a class="postlink" href="http://www.meadroid.com/scriptx/index.htm">http://www.meadroid.com/scriptx/index.htm</a><!-- m --><br />
<br />
When you go to the page, accept the two dialog boxes and the script will work, but for dissemination there is a link to an achive copy of the controls.<br />
<br />
In my particular case this isn't a problem because the relevent pages will only be available to staff within an Intranet.<br />
<br />
Interestingly, this seems to be the only solution to my particular request.<br />
<br />
Once again, thanks.<br />
<br />
Gav<!--content-->
 
Back
Top