Property

Method

Event

 

 

HyperLinkDefaultTarget v5.0.0.6

Specifies the default target of a hyperlink. (available in Web Editor Control 5.0.0.2 and above)

Syntax

    [get] HRESULT HyperLinkDefaultTarget(
    BSTR* pVal
    );
    [put] HRESULT HyperLinkDefaultTarget(
    BSTR newVal
    );

Parameters

[get] pVal

[out, retval] Returns the current default target.

[put] newVal

[in] Specifies a new default target.

Return Values

0 (always)

Remark

The specified default target is applied to all created hyperlinks, whether created automatically when the user types a URL or explicitly when the user uses the Insert-Hyperlink... menu command.

 

The target frame specifies the frame of a frameset, or the name of a window, in which the linked document will be opened when the link is clicked. You can enter one of the following standard target names or any other frame or window name.

 

_blank

The specified document will be loaded in a new window.

_parent

The specified document will be loaded in the parent frame.

_self

The specified document will be loaded in the same frame as the current opened document.

_top

The specified document will be loaded in the entire window including the frame containing the current document.

Specifying HyperLinkDefaultTarget in the UI section of the Initialization file has the same result.

HyperLinkDefaultTarget is available only in Web Editor Control 5.0.0.2 or above.

Sample Codes

VB Script

dim object
set object = document.editForm
object.wec.HyperLinkDefaultTarget = "_blank"

JScript

var object;
object = document.editForm;
object.wec.HyperLinkDefaultTarget = "_blank";

See Also

HyperLinkDefaultTarget in the initialization file.