Hi all,
I am printing a page with tables made up of div's using the ID by separate JavaScript function by passing the div's Id as Parameter to that function. What happens was , when we see the printed document, the rows of tabel are split across pages and data is half printed on each of them. the end row is splitted and it looks awkward. I need a way to split the row either to completely include in a page or to be split to next page. Along with that I need to print the heading of the table before the starting row of the next page as it would be easier for the reader to check upon what column corresponds to what data.
For more clarity I have posted here my JavaScript code which prints the div based upon its ID.
function printdiv(printarea)
var headstr = "<html><head><title></title></head><body>";
var footstr = "</body>";
var newstr = document.getElementById(printarea).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr+footstr;
document.body.innerHTML = oldstr;
return false;
Please help if anyone has a solution for this