PRB: onafterprint Event Fires Before the Print Dialog Box Appears (272765)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 5.5, when used with:
This article was previously published under Q272765 SYMPTOMS
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.
CAUSE
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.
RESOLUTION
You cannot determine from a script whether the document actually printed.
MORE INFORMATION
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.
REFERENCESFor more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Modification Type: | Major | Last Reviewed: | 5/11/2006 |
---|
Keywords: | kbprb kbprint KB272765 |
---|
|