In Internet Explorer 5.5, the onafterprint event fires before the Print dialog box appears. In earlier versions of Internet Explorer, onafterprint fired after the Print dialog box appeared and only if the user chose to print the document from the dialog box. If the user chose to cancel this dialog box, the event would not fire.
↑ Back to the top
The onafterprint event does not indicate whether printing occurred; instead, onafterprint is designed to allow changes that are made in the onbeforeprint event to be modified after the markup.
↑ Back to the top
You cannot determine from a script whether the document actually printed.
↑ Back to the top
The onbeforeprint and onafterprint events are attached neither to the Print dialog box (where onbeforeprint fired after this) nor the printing (where onafterprint fires before this). They bracket the point at which a "snapshot" is taken of the markup for printing, and this behavior has not changed from Internet Explorer 5.0 to Internet Explorer 5.5.
The sequence in which the onafterprint event fires in relation to the Print dialog box may change in future versions of Internet Explorer to synchronize with the Print dialog box.
↑ Back to the top
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
↑ Back to the top