Search.../

target

Sets or gets the target of the dashboard text button's link.

Description

An element's target determines where its link opens. The target can be set so the link opens in the current page or in a new page.

Supported values are:

  • "_blank": The link opens in a new tab or window.
  • "_self": The link opens in the tab or window.
  • null: Resets the target property to its default value.

Type:

string

 | 

null
Read & Write, default value is "_blank"

Related Content:

Was this helpful?

Get the dashboard text button's current target

Copy Code
1let target = $w('#myElement').target; // "_blank"
Set the dashboard text button's target

Copy Code
1$w('#myElement').target = "_self";
Reset the dashboard text button's target

Copy Code
1$w('#myElement').target = null; // Resets the target property to its default value of "_blank"