HP Anywhere 10.02 API Reference
Show:

HPA.Message Class

Module: HPA

Available since HP Anywhere 10.00

[Smartphone and Tablet Editions]

Display a message.

Usage example:

HPA.Message.error('My Error message', function(){ this.afterErrorMsg() }, this);

Methods

confirm

(
  • message
  • [callback]
  • [scope]
)

Display a confirmation message, with 'OK' and 'Cancel' buttons. Pass a callback to process user selection.

Parameters:

  • message String

    Text to display.

  • [callback] Function optional

    Callback function to be called after the user taps a button; the first argument will be either 'yes' (for 'OK') or 'no' (for 'Cancel').

  • [scope] Object optional

    The scope ('this' reference) in which the callback function is executed.

error

(
  • message
  • [callback]
  • [scope]
)

Display an error message.

Parameters:

  • message String

    Text to display.

  • [callback] Function optional

    Callback function to be called after the user dismisses the message.

  • [scope] Object optional

    The scope ('this' reference) in which the callback function is executed.

info

(
  • message
  • [callback]
  • [scope]
)

Display an information message.

Parameters:

  • message String

    Text to display.

  • [callback] Function optional

    Callback function to be called after the user dismisses the message.

  • [scope] Object optional

    The scope ('this' reference) in which the callback function is executed.

warning

(
  • message
  • [callback]
  • [scope]
)

Display a warning message.

Parameters:

  • message String

    Text to display.

  • [callback] Function optional

    Callback function to be called after the user dismisses the message.

  • [scope] Object optional

    The scope ('this' reference) in which the callback function is executed.