onafterprint

Description

Event handler to be called when print spooling is done.

The event is applicable to the results of a Print call but not to that of a PrintHTML call. It can be used to update the user interface accordingly. It is similar to the WaitForSpoolingComplete blocking call, but is asynchronous.

Note the difference between ScriptX's onafterprint event and the DHTML window.onafterprint event: the latter occurs after Internet Explorer has just made a document snapshot for printing and not after the actual print spooling job so these two events arenot interchangeable.

Note: The DHTML window.onbeforeprint and window.onafterprint events exist to give the document's script a chance to customize DHTML content before it goes to print-out or preview (and not to signal actual printing). The same effect can be achieved with the CSS  media=print or media=screen specific styles.

Syntax

printing.onafterprint = function_object

Settings

This is a read/write property.

Applies To

printing

Example

<script>
factory.printing.onafterprint = AfterPrint;

function AfterPrint() {
  alert("The document has been sent to the print spooler!");
}
</script>

See Also

onpagesetup, onuserpagesetup, onuserprint, onuserprintpreview

PrintWaitForSpoolingComplete