Forum Moderators: open
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function printme() {
window.print();
document.body.onfocus = doneyet;
}
function doneyet() {
document.body.onfocus = "";
alert("after print dialog");
}
</script>
</head>
<body>
<a href="javascript: printme()">print me</a>
</body>
</html>
An interesting approach you took there. That might just work in ie, but opera doesn't fire the focus afterwards (it does if you click away and then back...)
looks like that will suffice though... thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<script type="text/javascript">
function printme() {
window.print();
document.body.onmousemove = doneyet;
}
function doneyet() {
document.body.onmousemove = "";
alert("after print");
}
</script>
</head>
<body>
<a href="javascript: printme()">print me</a>
</body>
</html>
This works in Opera, but not in IE :)