RoyKruyshaar
asked on
no header/footer printing
How can I make a HTML-page where, when the client print the page, no headers and footers were printed? I know the client can arange it in his browser, but I want that the headers and footers can't be printed at al.
If you mean the header and footer that you have on your page, you can always put them in frames... only the active frame will get printed...
Or you could create what you want to be printed in pdf, and have them download that and print it (it loads in the browser if they have it installed right:). This way you have better control of how it looks.
-Josh
Or you could create what you want to be printed in pdf, and have them download that and print it (it loads in the browser if they have it installed right:). This way you have better control of how it looks.
-Josh
ASKER
Dear DreamMaster,
When you print a HTML-page, you will get the URL at the bottom and Page X of Y on the top. I want that the client doesn't print that lines. I understand that you can arange it in your browser, but I want it arranged in mij HTML-page so that the client never print these two lines.
Thank you for your response.
When you print a HTML-page, you will get the URL at the bottom and Page X of Y on the top. I want that the client doesn't print that lines. I understand that you can arange it in your browser, but I want it arranged in mij HTML-page so that the client never print these two lines.
Thank you for your response.
I don't believe this is possible. You may want to look into using .pdf or .doc files if you want to control this kind of thing.
-Josh
-Josh
i'm sure it's possible....but (were You waiting for the catch?) i think it's only possible if You know how to manipulate the browsers print function (of which You spoke), the problem is that, even if You know that, You won't have it done for all browsers, as each handles this kind of stuff differently.
I seriously believe that the amount of problems that brings, doesn't weigh in to the small problem of some extra information on the printed page.
So, in other words, it's probably possible, as there's not much that's not, but probably not worthwile!
if You want to be able to do this anyway, i think You'll need to find someone that knows how to alter the settings of the individual browsers, without leaving the page.
Max Davidse.
The Kitchen Interactive
http://www.thekitchen.nl/
I seriously believe that the amount of problems that brings, doesn't weigh in to the small problem of some extra information on the printed page.
So, in other words, it's probably possible, as there's not much that's not, but probably not worthwile!
if You want to be able to do this anyway, i think You'll need to find someone that knows how to alter the settings of the individual browsers, without leaving the page.
Max Davidse.
The Kitchen Interactive
http://www.thekitchen.nl/
You'd probably have to use a plugin which modified the browser. Writing your own custom plugin for just this may be a little extreme! But netscape does release it's source code....
-Josh
-Josh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
From where I'm sitting the stats are quite a bit different! Where do you get your info from? Everyone I know uses and prefers Netscape... oh well. Also the stats I've collected have all showed a larger market in netscape.
But I guess there is an appeal to using a browser which when it crashes, crashes your entire system. I like rebooting :)
The only thing a like about IE is it's GREAT support of DOM. Everything is truly dynamic and I really wish Netscape would add this support soon!
-Josh
But I guess there is an appeal to using a browser which when it crashes, crashes your entire system. I like rebooting :)
The only thing a like about IE is it's GREAT support of DOM. Everything is truly dynamic and I really wish Netscape would add this support soon!
-Josh
lol....You like rebooting? and i thought i was nuts!
actually i get my info from several different sources, amongst one is the leading counter site, it not only keeps track of it's own visitors, but also of all of their clients (sounds representative to me) now i know there are always die-hards that swear on using Netscape, and i have to agree on one part..Netscape is more strict in the use of correct syntax, so programmers that are able to make a website work in Netscape at once are (in my humble oppinion) better programmmers then visa versa. But i still think IE is much better in the use of several tags..
For example,
i always have and always will love the fact that Netscape doesn't even support it's own layer tag properly.
But then again...who am i to complain?
Max Davidse
actually i get my info from several different sources, amongst one is the leading counter site, it not only keeps track of it's own visitors, but also of all of their clients (sounds representative to me) now i know there are always die-hards that swear on using Netscape, and i have to agree on one part..Netscape is more strict in the use of correct syntax, so programmers that are able to make a website work in Netscape at once are (in my humble oppinion) better programmmers then visa versa. But i still think IE is much better in the use of several tags..
For example,
i always have and always will love the fact that Netscape doesn't even support it's own layer tag properly.
But then again...who am i to complain?
Max Davidse
Yes, I've often wondered why it doesn't support layer tags properly?? It has to be a div with dynamic positioning for it to treat it like a 'real' layer... so that means that a layer tag isn;t a real layer? This isn't making any sense. What where they thinking?
Oh well... The rebooting thing was sarcasm of course... but I probably should reboot more often:) I only do it about every week or so when I crash. I leave it running all the time to run Seti@home...
-Josh
Oh well... The rebooting thing was sarcasm of course... but I probably should reboot more often:) I only do it about every week or so when I crash. I leave it running all the time to run Seti@home...
-Josh
well actually Josh, i have found out that almost every time i run a site in Netscape...it crashes at least once...
also the fact that i can build a website without thinking what i wanted to make, for IE, and it'll all work without having to re-program anything, has convinced me that IE is the best browser for me.
Such a pitty we still have to support Netscape, especially when not only the PC is supported but also Macintosh and such "beautifull" platforms, that all handle stuff differently.
and yes, it is weird that Netscape doesn't support a tag properly they invented for themselves..tsk....
Max Davidse.
also the fact that i can build a website without thinking what i wanted to make, for IE, and it'll all work without having to re-program anything, has convinced me that IE is the best browser for me.
Such a pitty we still have to support Netscape, especially when not only the PC is supported but also Macintosh and such "beautifull" platforms, that all handle stuff differently.
and yes, it is weird that Netscape doesn't support a tag properly they invented for themselves..tsk....
Max Davidse.
i have a solution for internet explorer
it's a plugin
u can get it from this site
http://www.meadroid.com
if u have a solution for the other browsers plz let me know.
and here is a source code to use:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function printWindow(){
factory.printing.header = "HIPLUS"
factory.printing.footer = "??"
factory.printing.portrait = false
factory.printing.leftMargi n = 1.0
factory.printing.topMargin = 1.0
factory.printing.rightMarg in = 1.0
factory.printing.bottomMar gin = 1.0
factory.printing.Print(fal se,window)
}
function Sub_Beforeprint()
{
// Walk through all the elements in the document with
// CLASS="collapsed" and set it to "expanded" just for printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i<coll.length; i++)
if (coll[i].className == "collapsed")
{
coll[i].className = "expanded";
// After printing, make sure to set CLASS="collapsed"
// only for those that were expanded just for printing.
coll[i].bExpandedForPrinti ng = true;
}
else if (coll[i].className == "expanded")
coll[i].bExpandedForPrinti ng = false;
}
}
function Sub_AfterPrint()
{
// Walk through all the elements in the doc with CLASS="expanded"
// and set it to "collapsed" if expanded just for
// printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i < coll.length; i++)
if ((coll[i].className == "expanded") &&
(coll[i].bExpandedForPrint ing))
{
coll[i].className = "collapsed";
coll[i].bExpandedForPrinti ng = false;
}
}
}
window.onbeforeprint=Sub_B eforeprint ;
window.onafterprint=Sub_Af terPrint;
//-->
</SCRIPT>
</HEAD>
<object id=factory style="display:none" classid="clsid:1663ed61-23 eb-11d2-b9 2f-008048f dd814"
codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360">
</object>
<BODY>
<a href="#" onclick=printWindow();>??? ?</a>
</body>
</html>
it's a plugin
u can get it from this site
http://www.meadroid.com
if u have a solution for the other browsers plz let me know.
and here is a source code to use:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function printWindow(){
factory.printing.header = "HIPLUS"
factory.printing.footer = "??"
factory.printing.portrait = false
factory.printing.leftMargi
factory.printing.topMargin
factory.printing.rightMarg
factory.printing.bottomMar
factory.printing.Print(fal
}
function Sub_Beforeprint()
{
// Walk through all the elements in the document with
// CLASS="collapsed" and set it to "expanded" just for printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i<coll.length; i++)
if (coll[i].className == "collapsed")
{
coll[i].className = "expanded";
// After printing, make sure to set CLASS="collapsed"
// only for those that were expanded just for printing.
coll[i].bExpandedForPrinti
}
else if (coll[i].className == "expanded")
coll[i].bExpandedForPrinti
}
}
function Sub_AfterPrint()
{
// Walk through all the elements in the doc with CLASS="expanded"
// and set it to "collapsed" if expanded just for
// printing.
var coll = document.all.tags("DIV");
if (coll!=null)
{
for (i=0; i < coll.length; i++)
if ((coll[i].className == "expanded") &&
(coll[i].bExpandedForPrint
{
coll[i].className = "collapsed";
coll[i].bExpandedForPrinti
}
}
}
window.onbeforeprint=Sub_B
window.onafterprint=Sub_Af
//-->
</SCRIPT>
</HEAD>
<object id=factory style="display:none" classid="clsid:1663ed61-23
codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360">
</object>
<BODY>
<a href="#" onclick=printWindow();>???
</body>
</html>
please formulate Your question differently because this way i don't understand Your question, what headers and footers do You mean, are You talking about the link on the bottom of the page and the title on the top of the page??
Max Davidse.