Feedback on: irt.org FAQ Knowledge Base Q1478
Worth:
Worth reading
Comments:
It is much easier in IE4 to just give the frame that you want to print focus(). When the form button is clicked the javascript gives focus() to the desired frame and then just call the print() function.
For example, the calling frame:
<script language="Javascript">
function print_report() {
parent.frames[1].focus();
parent.frames[1].print();
}
</script>
<body>
<form>
<div align="center"><center><p><input type="button" value="Print Report" name="B1"
onClick="javascript:print_report();"></p>
</center></div>
</form>
</body>
Just thought you might want to know.
Worth:
Worth reading
Comments:
It doesn't work under IE5. Explorer presents typical print window (print all, print selected frame...). Printing selected frame does just it: print selected frame, no the one specified in top.framename.print()
Worth:
Worth reading
Comments:
You've gotta do "top.otherframe.focus()" before printing, otherwise it doesn't work properly in some cases under IE5.
Worth:
Very worth reading
Comments:
Are you sure that this is working?.
it works fine with Netscape 4.7, but is does not work with IE 5.5
Any suggestions how to make it work for both browsers?
Thanks for your help
Roman
Worth:
Very worth reading
Comments:
It works on IE5, but the frame you're trying to print must be in the same server as the frame you are printing from, otherwise you will get an "access denied" error.