|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there, I am using window.print method to print the current HTML page thru javascript which is working perfectly fine. But a small problem is that I am trying to print a tablular format data which spans across two pages. the headings of the table are displayed on the first page but not on the second page. What should I do to display the headings of the table on the second page also.
|
|
#2
|
||||
|
||||
|
I generally try to determine how many rows will fit on a page and loop the the data to close the table and start a new one for each page. You can force a page break after closing the table to ensure that the heading for the next page does indeed start on the next page.
__________________
Neal Schafer The early worm gets eaten. |
|
#3
|
|||
|
|||
|
Do you have an example in more detail as to how you do this? Maybe some code?
Thanks |
|
#4
|
||||
|
||||
|
You can also force the printed output to behave nicely for you. For example, you could start each page with <H2> and end it with <H3>. To make the page breaks work properly, you could add the following CSS:
Code:
<style>
h2 { page-break-before: auto; }
h3 {page-break-after: auto; }
</style>
MK |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Window.Print() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|