Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

Hourglass Module

The Hourglass Module is used to show or hide the hourglass (wait cursor) as well as adjust its position.

Syntax

hourglass (Module) <META> Syntax

<META HTTP-Equiv="Hourglass" content="[parameter]">

Hourglass JavaScript Object Syntax:
By default the JavaScript Object 'hourglass' will exist on the current page and can be used to interact directly with the hourglass.
To Set hourglass parameters via JavaScript use the following syntax: hourglass.parameter = 'value'; remembering to enclose your value in quotes where appropriate.

e.g. hourglass.visibility = 'value';
To set multiple EMML parameters / events on a single line use the following syntax: hourglass.setEMML("[Your EMML Tags]");

e.g. hourglass.setEMML("visibility:value");
Hourglass Ruby Object Syntax:
By default the Ruby Object 'Hourglass' will exist on the current page and can be used to interact directly with the Hourglass. All Methods, Parameters and Events are the same as JavaScript, however, notice 'Hourglass' needs to start with an uppercase letter. Another difference in Ruby is that methods do not end in '()'
To Set Hourglass parameters via Ruby use the following syntax: Hourglass.parameter = 'value' remembering to enclose your value in quotes where appropriate.

e.g. Hourglass.visibility = 'value'

Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description Default Value
visibility:[Value] Visible or Hidden Shows or hides the hourglass Hidden
left:[Value] Horizontal position, in pixels Sets the horizontal position of the hourglass Center of the screen
top:[Value] Vertical position, in pixels Sets the vertical position of the hourglass Center of the screen

Multi Instance

When multiple RhoElememts applications are running the following considerations should be made: The hourglass settings are application specific. Switching to another application which uses the hourglass module will apply the focused application’s settings to it, e.g. it may move position or be shown / hidden. Applications which do not have focus will not have their hourglass shown.

Remarks

Navigation

When navigating between pages the hourglass will be shown and hidden automatically and will override the current visibility settings. The position the hourglass is shown at during page loads will be as set using the Left / Top properties. Because the Hourglass is shown and hidden automatically during page loads it is not recommended to use static meta tags to show or hide it, in preference use InvokeMETATag from JavaScript.

Scrolling

The hourglass is not compatible with scrolling the browser window. The spinning cursor will move with the HTML page.

Requirements

RhoElements Version 1.0.0 or above
Supported Devices All supported devices.
Minimum Requirements None.
Persistence Partially Transient - any changes made by changing parameters will be lost when navigating to a new page with the exception that the wait cursor will always be hidden once the new page has loaded.

HTML/JavaScript Examples

The following example sets the Hourglass position to (50, 50).

<META HTTP-Equiv="Hourglass" Content="left:50; top:50">

The following example shows and hides the Hourglass.

  <SCRIPT LANGUAGE="JavaScript">
    function showHourglass()
    {
        hourglass.visibility = 'visible';
    }

    function hideHourglass()
    {
        hourglass.visibility = 'hidden';
    }
  </SCRIPT>
Back to Top