ndhai
asked on
How to print well one table with window.print();
Hi everybody,
I have a trouble when I print a table in HTML with function window.print();
For example, I have a big table following
<table border=1>
<tr><td> big data here .......................... ..</td></t r>
<tr><td> big data here .......................... ..</td></t r>
<tr><td> big data here .......................... ..</td></t r>
--------------repeat many times here --------------
<tr><td> big data here .......................... ..</td></t r>
<tr><td> big data here .......................... ..</td></t r>
<tr><td> big data here .......................... ..</td></t r>
</table>
So when I print it by javascript function window.print();, normally, there is one rows who is in 2 pages. Could I force to print this row in the next page and don't print it in the previous page ?
Thanks for your helps
Best regards
ndhai
I have a trouble when I print a table in HTML with function window.print();
For example, I have a big table following
<table border=1>
<tr><td> big data here ..........................
<tr><td> big data here ..........................
<tr><td> big data here ..........................
--------------repeat many times here --------------
<tr><td> big data here ..........................
<tr><td> big data here ..........................
<tr><td> big data here ..........................
</table>
So when I print it by javascript function window.print();, normally, there is one rows who is in 2 pages. Could I force to print this row in the next page and don't print it in the previous page ?
Thanks for your helps
Best regards
ndhai
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@Roonaan
It doesn't work for your two solution
you could try with my table
<input type=button value=Print onclick="window.print();">
<table border=1 style="page-break-before:a lways;">
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>.................. ......</td ></tr>
</table>
@COBOLdinosaur: I am at Office and I will try with your solution
thanks in advance
It doesn't work for your two solution
you could try with my table
<input type=button value=Print onclick="window.print();">
<table border=1 style="page-break-before:a
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
<tr><td> big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data <br>here ....<br>big data here ....<br>big data here ....<br>..................
</table>
@COBOLdinosaur: I am at Office and I will try with your solution
thanks in advance
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
Split between : COBOLdinosaur {12303483} & Roonaan {12298915}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Jester_48
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Split between : COBOLdinosaur {12303483} & Roonaan {12298915}
Any objections should be posted here in the next 4 days. After that time, the question will be closed.
Jester_48
EE Cleanup Volunteer
ASKER
Hello
I amnot agree because there is no answer for me upto now :(
I am still trying the good anwser
ndhai
I amnot agree because there is no answer for me upto now :(
I am still trying the good anwser
ndhai
>>> there is no answer for me upto now
What you want will require re-invention of the technology. So until you write a new browser that does what you want, you have the answers available. It does not matter how long you wait you are not going to get what you want; and it is long post the time when this should be closed.
Cd&
What you want will require re-invention of the technology. So until you write a new browser that does what you want, you have the answers available. It does not matter how long you wait you are not going to get what you want; and it is long post the time when this should be closed.
Cd&
-r-