Поделиться через


__IE_PrintType property

Retrieves a string specifying whether a print template should prompt the user with the Print dialog box, with the Print Preview dialog box, or not prompt the user at all.

Syntax

JScript
p = object.__IE_PrintType

 

Property values

Type: String

One of the values in the Property Values section.

Remarks

The __IE_PrintType property applies only to print templates, regardless of whether they show a Print Preview dialog box.

A print template should query for this value to determine what type of printing prompt, if any, should be shown to the user.

Examples

The following function, which might be the onload event handler for a print template, shows how to use the __IE_PrintType property. By default, a print template displays the Print Preview dialog box—for this reason, there is no handler for the "Preview" case in the switch. For information on printing support, see the TEMPLATEPRINTER reference page.

function Init()
{
    switch (dialogArguments.__IE_PrintType)
    {
        case "Prompt":
            var bConfirmed = Printer.showPrintDialog();
            if (bConfirmed) DoPrint();
            break;
        case "NoPrompt":
            DoPrint();
            break;
        case "Preview":
        default:
            break;
    }
}