eHow launches Android app: Get the best of eHow on the go.

How To

How to Create Conditional Actions in Web Pages for Mobile Devices

Contributor
By Anna Roberts
eHow Contributing Writer
(0 Ratings)

Because the elements of WML are so similar to HTML, creating Web pages for mobile devices is similar to creating pages for the Web accessed via traditional browser. However, some elements are specific to programming for mobile devices. In some instances, you may want to have a different action triggered depending on whether the user has come to the page via a menu or link, or returned to the page with a "Prev" button.

Difficulty: Challenging
Instructions
  1. Step 1

    Type "<onevent type=" within the card element and card tag (type the symbols and letters within the quotation marks, but not the quotation marks themselves).

  2. Step 2

    Type either "onenterforward" or "onenterbackward." Use the former if the action is to occur only when the user enters the card from a link or menu and the latter if the action is to occur only when the user enters the card via the "prev" element.

  3. Step 3

    Type ">".

  4. Step 4

    Create a go, prev, refresh, or noop action.

  5. Step 5

    Type "</onevent>" to close the onevent tag.

Tips & Warnings
  • You may conditionally jump to another page by typing "<card onenterforward="destination.url">" where "destination.url" is the location to jump to. Use "<card onenterbackward="destination.url">" the same way. Schedule an action with the "ontimer" variable to create an action that occurs after a set period of time.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

Demand Media
eHow_eHow Technology and Electronics