- Total Members: 220,328
- Threads: 525,402
- Posts: 977,028
Great community. Great ideas.
Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.
-
November 5th, 2012, 11:44 AM
#1
Splitting a Page across pages along with heading
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;
window.print();
document.body.innerHTML = oldstr;
return false;
}
Please help if anyone has a solution for this
Thanks
Similar Threads
-
By jonance in forum ASP Development
Replies: 1
Last Post: June 13th, 2010, 01:31 AM
-
By darrenmstewart in forum ASP Development
Replies: 1
Last Post: November 4th, 2008, 03:59 PM
-
By Guddu in forum ASP Development
Replies: 1
Last Post: August 15th, 2008, 05:33 AM
-
By jessie2477 in forum .NET Development
Replies: 21
Last Post: November 9th, 2007, 03:37 PM
-
By teeheiman in forum ASP Development
Replies: 7
Last Post: July 10th, 2006, 07:33 PM