Article ID: 272765
Article Last Modified on 5/11/2006
APPLIES TO
- Microsoft Internet Explorer 5.5, when used with:
- the hardware: Intel x86
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.
REFERENCES
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
Additional query words: window.print
Keywords: kbprint kbprb KB272765