Nej ... ikke lukke. Dette script centrerer popup'en:
<script type="text/JavaScript">
function openPrint() {
var t,l,w,h;
w = 500; // Popup-bredde
h = 400; // Popup-højde
l = (screen.availWidth-w)/2;
t = (screen.availHeight-h)/2;
var win = window.open("print.html","win","width="+w+",height="+h+",left="+l+",top="+t);
win.focus();
}
</script>
og 'print.html':
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<title>Print Side</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="printCont"></div>
<button onclick="window.close()">Luk</button>
<script type="text/JavaScript">
document.getElementById("printCont").innerHTML = opener.document.getElementById("printthis").innerHTML;
window.onload = function() {
document.print()
}
</script>
</body>
</html>