Home Features Toolbar Library Forum Download Support Tutorial Manual
3. Reference
Triggers
OnBeginLoad
OnLoad
OnChange
OnActivate
OnSelect
OnFocus
OnKillFocus
OnRank
OnSave
Controls
Variables
System Variables
Global Values
Functions
Text Functions
  

OnLoad Trigger

The onload trigger is activated when a new page is loaded in the browser.

Syntax:

    onload="Function(); Function2(); ..."
    onload="http://www.somedomain.com"


Remarks:

  • The trigger can be used to execute one or more functions.
  • Instead of a function, you can specify the URL of a page to open.


Example:

    <xml id="toolbar">
    <control type="toolbar">
    <toolbar caption="OnLoad Example">
    <button
      caption="Idle"
      onload="SetCaption(this,'Loaded %URL%'); SetIcon(this,'http://www.toolbarbrowser.com/img/smiley.io')"
      onbeginload="SetCaption(this,'Loading...')">

    </button>
    </control>
    </toolbar>
    </xml>


    In the above example, when a page starts to load, the onbeginload trigger changes the caption to "Loading...".
    After the page is loaded, the onload trigger executes two functions. The first changes the caption to display the URL of the loaded page and the second changes the icon.


Website Popularity Rank | Build Your Own Toolbar | Free Download | Custom Toolbars | Features | Contact Us

ToolbarBrowser is a freeware project supported by Trellian Limited. | Privacy Policy