469,590 Members | 1,996 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

print scrollable div

Dan
Hi,

This may be the wrong place to ask this question, but here goes
anyway. I have a RIA that I developed so that there is a scrollable
div in the bottom right portion of the screen that always stays
there. The only problem with this is that now the client is
complaining that he cant print the content in this div properly. ie.
Firefox prints just what you see on the page. How can I go about
changing what Firefox prints (without changing the layout of the RIA
of course) so that just the content of the div is printed (all of the
content - even if you cant see it all)?

Any help would be appreciated!

Thanks,
Daniel
Jun 27 '08 #1
3 2291
Dan wrote:
This may be the wrong place to ask this question, but here goes
anyway. I have a RIA that I developed so that there is a scrollable
div in the bottom right portion of the screen that always stays
there. The only problem with this is that now the client is
complaining that he cant print the content in this div properly. ie.
Firefox prints just what you see on the page. How can I go about
changing what Firefox prints (without changing the layout of the RIA
of course) so that just the content of the div is printed (all of the
content - even if you cant see it all)?
Try to supply a CSS stylesheet for media="print" that defines the layout
you want your document to be printed with. That way you can define a
different layout just for printing, without changing the screen layout.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #2
Dan
On Apr 15, 9:41 am, Martin Honnen <mahotr...@yahoo.dewrote:
Dan wrote:
This may be the wrong place to ask this question, but here goes
anyway. I have a RIA that I developed so that there is a scrollable
div in the bottom right portion of the screen that always stays
there. The only problem with this is that now the client is
complaining that he cant print the content in this div properly. ie.
Firefox prints just what you see on the page. How can I go about
changing what Firefox prints (without changing the layout of the RIA
of course) so that just the content of the div is printed (all of the
content - even if you cant see it all)?

Try to supply a CSS stylesheet for media="print" that defines the layout
you want your document to be printed with. That way you can define a
different layout just for printing, without changing the screen layout.

--

Martin Honnen
http://JavaScript.FAQTs.com/
I have tried to accomplish this without much success. I can force
Firefox to only print the one div when printing (by setting every
other div to display:none;) but still cannot get it to print
everything in the div (it only prints what you see on the screen).
Also using this method, Firefox will not move the div to the normal
spot on the page when printing (if for example, the content in the div
was on the page by itself). I was wondering if there was just some
simple way to tell a browser to print only the content found in a
specified div instead of trying to play around with a whole new style
sheet for printing...
Jun 27 '08 #3
Dan wrote:
I have tried to accomplish this without much success. I can force
Firefox to only print the one div when printing (by setting every
other div to display:none;) but still cannot get it to print
everything in the div (it only prints what you see on the screen).
This is a CSS problem, not a JavaScript problem. You might want to make
sure the print stylesheet does not make the div scrollable. Ask in
comp.infosystems.www.authoring.stylesheets if you still have problems.
Or if the problem is Firefox specific then choose a newsgroup on
news.mozilla.org.
Also using this method, Firefox will not move the div to the normal
spot on the page when printing (if for example, the content in the div
was on the page by itself). I was wondering if there was just some
simple way to tell a browser to print only the content found in a
specified div instead of trying to play around with a whole new style
sheet for printing...
IE has events onbeforeprint and onafterprint but whether you specify a
different layout for printing using CSS or using script and those events
should not matter. With both approaches you need to set display to none
for those sections you do not want to be printed.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by Michael Schuerig | last post: by
1 post views Thread by ptg_abhishek | last post: by
1 post views Thread by david.joyce | last post: by
reply views Thread by Rune Jacobsen | last post: by
2 posts views Thread by tshad | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.