|
Prev: to learn jQuery if already using prototype
Next: Is there a method to send gmail through a xmlhttprequest?
From: Dan on 15 Apr 2008 09:18 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
From: Martin Honnen on 15 Apr 2008 09:41 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/
From: Dan on 15 Apr 2008 11:43 On Apr 15, 9:41 am, Martin Honnen <mahotr...(a)yahoo.de> wrote: > 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...
From: Martin Honnen on 15 Apr 2008 11:53
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/ |