PDA

View Full Version : Switch Content Script II - print questions and answers regardless of expand state



jbruce
12-07-2009, 12:05 AM
1) Switch Content Script II


2) http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm

3) Describe problem

I've adapted the script for use on my page http://www.environment.gov.au/water/policy-programs/srwui/piip-sa/faq.html

It works wonderfully, except the page will only print both the questions and answers if the user first selects expand all.

My client want the questions and answers to appear on a printed version of the page regardless of whether the Contract All or Expand All option is selected (hence the reason I've had to stick a PDF download on the page as the 'printable' version)

Do you have a solution for this?

Apologies if someone has already asked this question - I did search through previous posts but couldn't find an answer to this for version II of the switch content script (though I did find something for what I guessed was v.I of the script but I couldn't see a way to apply this to a v.II implementation)

ddadmin
12-07-2009, 01:18 AM
Assuming the DIVs you're expanding/ contracting are DIV tags, you can use CSS to specify that they expand when printed:


<style type="text/css">

@media print{
div{
display:block !important;
}
}

</style>