473,372 Members | 1,045 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

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 2470
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header |...
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
1
by: ptg_abhishek | last post by:
Hullo, I tried the print method provided by javascript to print the frame in current focus. Only the visible content is printed, any hidden content in the current frame does not appear in the...
1
by: david.joyce | last post by:
I am aware that v7 Static Scrollable Cursors do not work with pseudo-conversational CICS because of the temp work file being destroyed but will v8 Dynamic Scrollable Cursors work with...
2
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using...
3
by: RMuthuKumaran | last post by:
When we are trying to execute scrollable resultset APIs (rs.last etc.,) we get the following error. (Database version: UDB 7. on Windows. Driver: Type 4.) This method should only be called on...
0
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will...
2
by: tshad | last post by:
I was just looking at a site that had scrollable grids and was wondering how that is done? It was an aspx page, but I have only seen Datagrids that were non-scrollable. You can page a grid but...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.