It makes all the sense in the world, but its not working. Any idea why?
Click the popup button to popup a new screen, and then click the print
button on the popup (which doesn't do anything!).
<html>
<head>
<title>UGH!</title>
<script type="text/javascript">
function createPrintPageHeader(x) {
x.document.write("<HTML>\n");
x.document.write("<HEAD>\n");
x.document.write("<TITLE>Report</TITLE>\n");
x.document.write("</HEAD>\n");
x.document.write("<BODY>\n");
}
function createPrintPageFooter(x) {
x.document.write("</BODY>\n");
x.document.write("</HTML>\n");
}
function doPrint() {
printWin=open('','printWindow','resizable=no,width =690,height=600,menuba
r=yes,status=yes,scrollbars=yes');
createPrintPageHeader(printWin);
printWin.document.write('foo');
printWin.document.write('<form>');
printWin.document.write('<input type=\"button\" value=\"Print contents
of popup\" onclick=\"self.print()\">');
printWin.document.write('</form>');
createPrintPageFooter(printWin);
}
</script>
</head>
<body>
<p>This is just a paragraph. </p>
<form>
<input type="button" value="PopUp" name="btnPopUp"
onclick="doPrint()"></p>
</form>
</body>
</html>
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!