Hello Friends:
I'm in a trouble with print page in my articles pages . I just added a link to create
print friendly page. and I 've specified the <div id="PrintContent">........</div> to
take the content to popup window to display print page for content and a link
is <a href="Javascript:PrintThisPage()">print this page</a> .although the script as follows:
<script>
function PrintThisPage() {
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25";
var content_value=document.getElementById("PrintContent").innerHtml;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>صفحة الطباعة</title>');
docprint.document.write('</head><body onLoad="self.print()"><center>');
docprint.document.write(content_value);
docprint.document.write('</center></body></html>');
docprint.document.close();
docprint.focus();
}
the code runs well except the content doesn't show up in the popup window . it shows only one
word 'undefined' can some one tell me how to solve it.
Bookmarks