Click to See Complete Forum and Search --> : with CSS


catchup
09-25-2003, 08:06 PM
Hello, I'm calling a Javascript function, and am hoping to direct the called function to print associated correct text style, when the browser print button is instigated. Can someone help this doh-doh brain? Thanks

This is what I have so far:


<html>
<head>
<script language="JavaScript"><!--
function text1(){
....
}
function text2(){
....
}
function text3(){
....
}
// --></script>

<head>
<style type="text/css">
#print_text1 {
display:none;
}

@media print {
#print_invisible {
display:none;
}
#print_text1 {
display:block;
}
}
#print_text2 {
display:none;
}

@media print {
#print_invisible {
display:none;
}
#print_text2 {
display:block;
}
}
#print_text3 {
display:none;
}

@media print {
#print_invisible {
display:none;
}
#print_text3 {
display:block;
}
}
</style>
</head>
<body>
<span id="href='text1.html'">
page here
</span>
</body>

tinernet
09-27-2003, 09:18 AM
can you go into a lil more detail as to want you want to happen on the page. as far as i kno theres no way in css or js to check whether u press print, as i assume it has its own functions programmed into by the creators. the only way i could think would be to make ur own button and print script, but dont lookat me for it im no good at this.......
try www.dynamicdrive.com or somethin similar