• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1606
  • Last Modified:

window.close() would not work after using print preview

The javascript function window.close not work after the print the window using the print preview and close the print preview window using the [X].
This work if use the close button in the print preview window (IE 6). IE 7 do not have the close button.

I tried the solutions mentioned in these sites:
- http://www.webmasterworld.com/forum21/4506.htm
Using this.window.close() but it does not work on IE6 nor IE7
- http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1629158&SiteID=1
Using Printer.updatePageStatus(-1) , but an error message of Printer is undefined appears.

How to fix this?
1 Solution
Michel PlungjanIT ExpertCommented:

<a href="#"
onClick="window.focus(); window.close(); return false">Close</a>

If that does not work, then I would think you will not get it working.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Tackle projects and never again get stuck behind a technical roadblock.
Join Now