MobiOne Logo

Using Widget Events and Actions

 

Contents

 

1. Events and Actions

For your application to be interactive, you need to assign actions to events. Events are triggered when a user clicks or makes a change to a widget, such as deselecting a checkbox. An action is what you want to happen when an event is triggered.

When appropriate, widgets have an Action property you can configure. Depending on the type of widget, the action is either On Click or On Change. Each action has a set of configuration options. All buttons, including radio buttons, list items and media images have an On Click action property. Select and input widgets (with the exception of radio buttons) have an On Change action property.

On Change and On Click action properties

Back to Contents

 

2. On Click Actions

All buttons, including radio buttons, list items and media images have an On Click action property. When you select an action, one or more configuration options appear. Each are described below.

Action Configuration Options

Go to Screen

Links to another screen in the application.

Screen: Click the More button to select the .mobi file you want to open when the widget is clicked.

Transition: Select the style of transition to use when switching to the specified screen.

Go to URL

Allows you to send email. Activates the device email application when you enter an email URL.

URL: Enter a URL you want to open when the widget is clicked. This allows you to send email by typing mailto:<email address> in this field.

Note: You can enter a URL to a web page in this field; however, Mobile Safari does not provide a way for your user to get back to your mobile site if you link to a page outside your site.

Go Back

Opens the previously viewed screen.There are no configuration options.

Popup Alert

Opens a popup window containing a message you supply.

Message: Type the message you want to display in a standard browser alert window.

Run JavaScript

Allows you to specify a JavaScript function to run.

Code: Type a single JavaScript line, or click the More button to open a simple JavaScript code editor for executing a JavaScript code snippet.

Dial Phone

Activates the device's phone dialer to call the phone number you specify.

Phone Number: Enter the phone number to dial.

Send SMS

Activates the device's text messaging application for sending a message to the phone number you specify.

Phone Number: Enter the phone number to message.

Submit Form

Submits form content when applied to a button or hyperlink widget within a form.

Reset Form

Resets form fields when applied to a button or hyperlink widget within a form.

Back to Contents

 

3. On Change Actions

All select and input widgets, excluding radio buttons, have an On Change action property. When you select an action, one or more configuration options appear. Each are described below.

Action Configuration Options

Popup Alert

Opens a popup window containing a message you supply.

Message: Type the message you want to display in a standard browser alert window.

Run JavaScript

Allows you to specify a JavaScript function to run.

Code: Type a single JavaScript line, or click the More button to open a simple JavaScript code editor for executing a JavaScript code snippet.

Back to Contents

 

Where Do I Learn More about MobiOne Studio?

The MobiOne online Learning Center site provides documents, tips, tutorials and videos to help answer your questions. Remember to check the Learning Center site for new and updated material.