Overview
1. OnPageLoad Demo
2. OnPageLoad Event
3. OnPageLoad and Variables
1. OnPageLoad Demo
Please turn on speakers for audio
To view on Vimeo, please click here.
2. OnPageLoad Event
The OnPageLoad event occurs when a page loads in the prototype. This feature is most commonly used to set dynamic panel states or values on widgets when a page is loaded. However, other actions can be performed on the page load like opening a popup window.
It is also available on masters. The OnPageLoad event on a master fires when a page that contains the master is loaded. The cases on the masters will be evaluated after the cases in the OnPageLoad event of the containing page.
The OnPageLoad event is defined in the Interactions section within the Page Notes pane. Cases are added to this event the same way they are added to events on widgets.
3. OnPageLoad and Variables
The OnPageLoad event is frequently used in combination with variables which carry their values from page to page as you navigate the prototype.
Cases on the OnPageLoad event often have conditions based on variable values or use variables values when setting the text on text panels.
For example, you might set the state of a dynamic panel depending on a variable indicating if a user is logged in, or you might set the text on a text panel with the user's name that is stored in a variable ("Hello [[UsernameVariable]]").