Download MP4

Another common interaction for the OnPageLoad event is to set the text on a widget to a value stored in a variable. For example, if you have a variable that stores a name, you might set a widget to

"Welcome, [[NameVar]]".

                                  

Learn more about this in the variables article.   

Ta-da! You just learned how to initialize a page with the OnPageLoad event.

This tutorial shows us how to use OnPageLoad, "Set Widget(s) to Selected Style" action, and masters to highlight the current page in a navigation menu.

 

Go to Navigation Menu Tutorial

A common use of the OnPageLoad event is to highlight a navigation item like a menu item in a menu or a button shape to indicate the current

page.

 

If your page contains button shapes or a menu with selected styles

defined, you can use the “Set Widget(s) to Selected Style” action in the OnPageLoad event, to highlight the menu item or button shape when the page loads.                                                                      

 

If you need to brush up on how to add widget styles, head over to

the Widget Styles article.

Add cases to the OnPageLoad event the same way you do with widget events. Just like with widget interactions, you can perform any of the actions available and as many as needed. You can also use conditional logic to determine how to initialize the page. Frequently, this involves conditions based on variable values.

The OnPageLoad event allows you to create interactions that fire on the load of a page. You can find the OnPageLoad event in the Page Interactions tab in the Page Properties pane below the Wireframe pane. This can be useful for performing actions like highlighting a menu item in a menu, setting a dynamic panel to a specific state, and inserting variable values into widget text.

Training   

Videos

Tutorials

Widget Libraries

Forum

HOME

FEATURES

WHY AXURE

HOW TO

SUPPORT

COMPANY

DOWNLOAD

BUY

My Account

In this article, learn how to use the OnPageLoad event to initialize pages like highlighting a navigation item, setting a dynamic panel state, and setting the text on a widget.

You can also add page load interactions in masters. The OnPageLoad event on a master fire when a page that contains the masters loads in the prototype. If the page also has an OnPageLoad interaction, the cases on the master will occur after the ones defined on the page.

 

 

Using a combination of conditional logic, variables and the Set Panel State to State action, you can set a dynamic panel to a state based on the value stored in the variable. For example, if you have a variable keeping track of whether the user is logged in, you might set a panel to a login state or a logout state accordingly.

 

Learn more about this in the variables article.

Still need help? Check out the forum or drop us a line at support@axure.com.

Home

Features

Why Axure

How To

Support

Company

Download

Buy

Contact

Privacy

Legal

Sitemap

© 2002-2012 Axure Software Solutions, Inc. All rights reserved.

 

Next Article

Previous Article

The Round Up

Initialize pages with

Page Load Interactions

Page Load Interactions Overview

OnPageLoad Event

Set Widgets to Selected States

Conditionally Set Dynamic Panel States

Set Text on a Widget to a Variable Value

Page Load Interaction Tutorials

Navigation Menu

This tutorial shows us how to use the OnPageLoad event to initiate an auto-rotating banner. This tutorial requires an understanding of the OnPanelStateChange event (see the Photo Carousel Tutorial).

 

Go to Auto-Rotating Banner Tutorial

Auto-Rotating Banner