Click here to Skip to main content
15,878,028 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
var popup ="PrintRecords.aspx");;
      popup.document.write("<html><head><link rel='Stylesheet' type='text/css' href='Css/Style.css' /></head><body class='background_style'>");

If we click the button in one page, the above block will be called. then it opens a new window with print dialog. If i close the print dialog by using Close Icon(X) , next line is not called(popup.close()).

Why the next line not called?

Your answer will be appriciated.. Thanks..

1 solution

I have no idea why doing all that. There is more healthy approach to printing of Web document. You can use CSS @media rules. Please see:[^].

This is like having "printable version", but in a civilized way. The styles detect what is the media for rendering and apply one or another set of rules.

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900