473,385 Members | 1,843 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,385 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 2473
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.