Apperyio ('component_name') is a shortcut to get a reference to a jQuery Mobile component on a screen by using its designated name. component_name is the name you set in Name property (in the PROPERTIES panel).
It’s important to familiarize yourself with the jQuery and jQuery Mobile API.
Here is example reading the input field value when clicking a button:
- Add a Click event to the button.
- Add a Run Custom Java Script action to the Click event.
var input = Apperyio('input'); alert (input.val());
The example above is a quick and easy way to get access to any component in the screen. It’s equivalent to using jQuery directly:
var input = $('input[dsid="input"]'); alert (input.val());
Once you get a reference to a component, which part of the jQuery API is available depends on the component. For example, if you get a reference to an Input component, then you could use this to read or set its value:
If you get a reference to a Label component, then the API is different, and to read the value, you would use: