PDA

View Full Version : fadeshow: printing html page shows dark pictures



randym56
05-07-2008, 09:00 PM
1) Script Title: fadeshow (javascript)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: When printing an html page that uses the fadeshow script, the photos are dark/faded views of the picture that is up at the time.

I move the mouse over the photo I want to "hold" then print the page - it is so faded and unclear it's unacceptable.

How do I print a clear photo that is being displayed?

Thanks in advance!
Randy

jscheuer1
05-08-2008, 09:06 AM
You could try a print specific stylesheet to overcome what you are describing, which sounds like partial opacity:


<style type="text/css" media="print">
* {
-khtml-opacity : 1!important;
-moz-opacity : 1!important;
opacity : 1!important;
filter : none!important;
}
</style>

Put the above in the head of your page. Worked here in local testing.

randym56
05-11-2008, 08:31 PM
Hi John,
Thank you for the script - it worked to print the picture properly, but now the entire page is pushed off to the right and cuts off 50% of the page. What am I missing?
Randy

jscheuer1
05-11-2008, 10:22 PM
How? I mean is the page's layout itself changed, or only as printed?

Pages will often change layout as printed, if that's all it is, it probably has nothing to do with my previous advice, but could probably be changed/fixed anyway.

If you give me a link to your page (which I would need anyway to figure this out), I could probably see for myself, but it would help to know.

And:

Please post a link to the page on your site that contains the problematic code so we can check it out.

Notes: I would also want to know what browser you are using that gives the result you mention. And, on a technical note, what I wrote in my last post was not a script. If that was the 'script' you were thanking me for, it isn't a script, it's css style. Either way, you're welcome. :)

randym56
05-11-2008, 10:30 PM
Footnote: If I change my printer settings to Landscape 8.5 x 11 (legal size), then the page prints on the right side of the page just fine (with a lot of white space on the left).

randym56
05-11-2008, 10:33 PM
You're right it's CSS not a script <my bad>.
The problem only exists in IE 7 (more than 50% of my users), but prints just fine in FireFox, Safari and Netscape.

randym56
05-11-2008, 10:36 PM
Here is the page:
http://m1resorts.com/listings_more.php?search_fd0=417

jscheuer1
05-11-2008, 11:21 PM
I see what you mean. Your page is in quirks mode (no valid URL DOCTYPE), so I suspect that has something to do with it. It would be hard to search through everything you are doing on that page to find the one or more things that, when their filter(s) are removed causes this in IE 7. However, we don't have to do that. Each slide show this script makes has a master division with an id of master[num], numbered 0 to however many slide shows you have on the page. In this case, with just one slide show, it would be master0. So we can change our print stylesheet to:


<style type="text/css" media="print">
#master0 * {
-khtml-opacity : 1!important;
-moz-opacity : 1!important;
opacity : 1!important;
filter : none!important;
}
</style>

Once again, worked here.

randym56
05-12-2008, 03:28 PM
You're a genius! THANK YOU!!!!