I’ve got a jQuery tabcontrol (4 tabs), which each of them control 1 gridview.
Now I got a button "print". It activates a JavaScript function, which should build a page, containing all gridviews. I got something, but it does not work:
function doPrintPage() {
myWindow = window.open('', '', 'titlebar=yes,menubar=yes,status=yes,scrollbars=yes,width=500,height=600');
myWindow.document.open();
myWindow.document.writeln("<link href='/styles/Layout.css' type='text/css' rel='stylesheet' ></link>");
myWindow.document.write(document.getElementById('tabcontainer').innerHTML);
myWindow.document.close();
myWindow.focus();
myWindow.print();
return true;
}
I thought it may be the getElementByID() and then something like tabcontainer (which contains the tabs) or tabcontent (the content of each tab) or GridView1 or something, but I could be completely wrong. As I ain’t got a clue…
Solution:
The separate gridviews were embedded in div’s ("tab#"), which were embedded in the tabcontainer.
Simple solution…
select the correct div ID…
Apparently I overlooked this one.