onuserprint

Description

Event handler to be called when a user invokes one of the following:

  • the Print... command from the Internet Explorer File menu
  • the Print... command from the document right-click context menu
  • the Print... command from the Command bar print button drop down menu
  • press the Ctrl-P key combination
  • some action that executes script that calls window.print()
  • For IE 7 and earlier, clicks the printer button on the Command bar. Please note that this interception does not occur with IE8 or later.

You may cancel this operation within the event handler simply by returning, or you may call Print to provide the expected behavior. ScriptX Techie Printing implements this behavior.

Syntax

printing.onuserprint= function_object

Settings

This is a read/write property.

Applies To

printing

Example

Check out the source code of the ScriptX Techie Printing example.

See Also

disableUI, onafterprint, onuserpagesetup, onuserprint, onuserprintpreview

PageSetup