PDA

View Full Version : Tab Content Script - Printing problem



kriskl
06-30-2006, 09:32 AM
Tab Content Script
http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

yesterday Tab sript got updated! and it's great! after evaluating over 10 different tabs, it's my favorite!

However one feature i miss - and the tab script before could do (or simply don't know how to get around) is printing.

When page is printed, I'd like to have content from all tabs printed on the same page.
I have setup css sheet for print, (which worked with previous tab script easily) but nothing happens with this one :(

any ideas anyone?

thanks a lot!

kris

djr33
06-30-2006, 09:54 AM
Yeah; I think that's because it has all the stuff there and only displays one at a time, but, when printing, it doesn't do as much with the javascript.
You could try changing it so that when inactive the divs (those are the tabs, right?) are set to hidden. Do that by as an attribute, and it won't print any of them. Then you can use javascript to unhide then when you want one disaplayed.
However, you will end up with a blank spot, not the one you're on.

Basically... this is gonna be a pain... it's not designed to work like that, sadly.

kriskl
06-30-2006, 10:04 AM
thank you for reply!

i'm javascipt dummy, i thought it was possible to make all tab contents visible with css, :(

It display all of them in dreamweaver - when i use the print css

it does not only work with browsers :(

jscheuer1
06-30-2006, 03:02 PM
Just put this at the end of tabcontent.css:


@media print {
.tabcontent {
display:block!important;
}
}

kriskl
06-30-2006, 03:52 PM
Thank you John!


This worked! you are a saviour ;)


kris

ddadmin
06-30-2006, 04:37 PM
That's a great idea John, thanks. Updated tabcontent.css with it.

aarti
12-04-2008, 09:55 AM
Hi

@media print {

.tabcontent {

display:block!important;

}

}

this works fine with IE6 - But With Mozzila 3...it still does'nt does not display to print..
Can you help with some solution which is cross browser compatible.

Aarti

jscheuer1
12-04-2008, 10:14 AM
You may be doing something wrong. By Mozilla, do you mean FireFox? Anyways, since this has already been incorporated in the script. Go to the demo page:

http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

with your FF browser. Do a print preview. You should see that all of the tabs are shown. I do in my FF Mozilla based browser (version 3.0.4).