1

Possible Duplicate:
Detecting browser print event

I am using jquery to move around some html (adding, deleting) so if a user prints the page it comes out nicer.

How can I target the print window prompt once its been closed so I can reverse it back to its original state?

My print button

<div id="printthispage" onClick="window.print();return false;"></div>

Thanks in advance.

Community
  • 1
  • 1
GermanMan
  • 103
  • 1
  • 11

1 Answers1

1

There are some events that have been adopted since FF 6 and it is native in IE. I believe this works in chrome, too.

body.onafterprint and body.onbeforeprint

https://developer.mozilla.org/en/Printing#Detecting_print_requests

FlavorScape
  • 13,301
  • 12
  • 75
  • 117