Forum Moderators: open
I got some pages that report data to the user. I provide them with a 'printer friendly' link that opens a new window and displays the page w/o fancy formatting. This new window has a anchor tag that gives the user an easy way to close the window...
<a href="javascript:" onClick="window.close();">Close Window</a>
It works fine, unless you decide to do IE's print preview function. After returning to the window (from the preview viewing) the link does nothing.
This behavior isn't the same in Mozilla 1.2.1. Mozilla works exactly like I expected it to, w/ or w/o 'print preview'.
Anybody else experienced this or know how to handle it?
Thanks.
Calvin Rapier
What you said got me thinking though. Since the print preview comes up in a different window, maybe the browser was getting confused as to which window it is supposed to close.
Probably flawed logic, but I changed the code to
<a href="javascript:this.window.close()">Close Window</a>
and now it works both before and after viewing the print preview in all my browsers.