MichiganRon
MIS
I am using PHP to dynamically generate pages with content garnered from a database. The pages contain tables which I would like to keep from being split on a page break. However, I'd like more than one table to print on a page if it will fit.
I can use the 'page-break-before' or 'page-break-after' CSS tags to accomplish this, however, I need to be able to calculate where to place these tags. Can anyone help me out here? How can I calculate where the page breaks should be inserted?
One caveat is that I am also using JavaScript to allow the user to "collapse" certain sections of tables if they do not wish to clutter their screen with that info (I use object.style.display="none") to do this. As a result, the page break locations can change depending on which tables are visible. So, I'd like to use the "onbeforeprint" event to trigger JS code that will calculate page breaks.
Any help here would be GREATLY appreciated.
-Ron
P.S. Of course, this post would not be necessary if IE supported the "page-break-inside:avoid;" CSS standard!
I can use the 'page-break-before' or 'page-break-after' CSS tags to accomplish this, however, I need to be able to calculate where to place these tags. Can anyone help me out here? How can I calculate where the page breaks should be inserted?
One caveat is that I am also using JavaScript to allow the user to "collapse" certain sections of tables if they do not wish to clutter their screen with that info (I use object.style.display="none") to do this. As a result, the page break locations can change depending on which tables are visible. So, I'd like to use the "onbeforeprint" event to trigger JS code that will calculate page breaks.
Any help here would be GREATLY appreciated.
-Ron
P.S. Of course, this post would not be necessary if IE supported the "page-break-inside:avoid;" CSS standard!