By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,519 Members | 1,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,519 IT Pros & Developers. It's quick & easy.

window.close() not working in IE after print Preview

P: 4
window.close() is not working after print preview and close preview window using the window [X]
Dec 10 '09 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,654
Some explanation will be helpful in solving the problem.
Dec 10 '09 #2

P: 4
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 in a particular format. 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 is not working.

This behavior isn't the same in Mozilla. Mozilla works exactly like I expected it to, w/ or w/o 'print preview'.

Anybody else experienced this or know how to handle it?
Dec 11 '09 #3

Expert Mod 15k+
P: 16,027
Try changing the href to a real link, "#" or use a button.
Dec 11 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.