Description

LabVantage Core JavaScript object.

File

WEB-CORE\scripts\sapphirecore.js

Properties

Property Type Description
jsdebug Boolean Determines if JS debug is enabled (same as system configuration property "jsdebug").

call

 

Functionality

Calls any JavaScript function.
Prompts the user if it cannot find the function.

Parameters

Parameter Type Description
oFunction Function Function object to call.
oaArguments Object Array Array of arguments to pass to the function.
oObject Object Object to run function in scope of (defaults to Window).

Return

Result of the called function.

statusMsg

 

Functionality

Displays a message in the status bar for the specified period of time.

Parameters

Parameter Type Description
sMsg String Message to display.
iShowTime Integer Time period during which the message is displayed (defaults to 3000 ms).

Return

None.

alert

 

Functionality

Displays a message using LabVantage dialogs (if available) or the alert box (if not).

Parameters

Parameter Type Description
sMsg String Message to display.

Return

None.

translate

 

Functionality

Translates the specified text using the LabVantage translation API over Ajax.

Parameters

Parameter Type Description
textid String Text to translate.

Return

None.

translatePartial

 

Functionality

Translates the specified tokenized text using the LabVantage translation API over Ajax. For example: "hello {{world}}" translates to world.

Parameters

Parameter Type Description
textid String Text to translate.

Return

None.

encryptField

 

Functionality

Performs an RSA JavaScript encryption (with a 1024-digit public key) of a field.

Parameters

Parameter Type Description
fieldid String Identifier of the field to be encrypted.

Return

None.