Forums

This topic is locked

Printing Scrolling Layers

Posted 08 Dec 2003 20:57:48
1
has voted
08 Dec 2003 20:57:48 wendy pixel posted:
Hi all -

I am hoping you can help me... I seem to recall there is a way to print all of what is in a scrolling layer thru the help of CSS style sheets...

I have a client who likes all of his text etc in a scrolling layer - and yet when you hit File/Print, we all know it will only print the page - - how can I get it so when the user hits File/Print, the entire page as and ALL of the text in the scrolling layer printer as well???

Many Thanks!

- Wendy
<font face='Tahoma'></font id='Tahoma'><font face='Times New Roman'></font id='Times New Roman'>

Replies

Replied 12 Dec 2003 18:56:43
12 Dec 2003 18:56:43 Wayne Hultum replied:
You could try this. It may be of some help.

<pre id=code><font face=courier size=2 id=code>&lt;script type="text/javascript"&gt;
&lt;!--
function printlayer(lname) {
var txt = document.getElementById(lname).innerHTML;
document.open();
document.write(txt);
document.close();
window.print();
// the previous line may need to be...
// document.print();
}
//--&gt;
&lt;/script&gt;

&lt;div id="layer1"&gt;
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
&lt;a href="#" onclick="printlayer('layer1'); return false;"&gt;print this layer&lt;/a&gt;
&lt;input type="button" value="print this layer" onclick="printlayer('layer1');" /&gt;
&lt;/div&gt; </font id=code></pre id=code>

Reply to this topic