Namespace: Browser

Browser

Encapsulates cross-browser-methods.

Members


<static> BrowserGetValueAttr :String

Enum for Browser.getValue() Parameter "attr".

Type:
  • String
Properties:
Name Type Default Description
KEY String key

Use to get the Primary Key.

TEXT String text

Use to get the shown text.

VALUE String value

Use to get the value.

STORE String store
SELECTION String selection
OFFSET String offset
FROM String from
TO String to
DATAFIELD String datafield
OPERATOR String operator
SEARCH String search

<static> supports

Object containing information about the support for different technologies.

Properties:
Name Type Description
supports Object
Properties
Name Type Description
touch Boolean
orientation Boolean
fileApi Boolean
geolocation Boolean
webWorkers Boolean
offline Boolean
historyApi Boolean
localStorage Boolean

Methods


<static> getValue(control [, attr])

Get the value from the given control.

Parameters:
Name Type Argument Description
control Object

Reference to an html element or an upControl object.

attr Browser.BrowserGetValueAttr <optional>

Additional information for target control, depends on target control.

Returns:
Type
String | Boolean
Example
Browser.getValue(getElement("[ELEMENT-GUID]"));

<static> setValue(control, value [, attr] [, fireEvent])

Set the value for the given control.

Parameters:
Name Type Argument Default Description
control Object

Reference to an html element or an upControl object, whose value is to be set.

value String | Number | Date | Boolean | Object

Control value to set.

attr Browser.BrowserGetValueAttr <optional>

Additional information for target control, depends on target control.

fireEvent Boolean <optional>
true

Trigger the onchange event.

Returns:
Type
Boolean
Examples
// general
Browser.setValue(getElement("[ELEMENT-GUID]"), "Hallo Welt!");
// Distribution-/Multiselect-Control
// strModus: append | replace
Browser.setValue(getElement("[ELEMENT-GUID]"), ["GUID1", "GUID2"], {bAsync: false, strModus: "append"});
// upIntegerControl | upCurrencyControl | upFloatControl
Browser.setValue(getElement("[ELEMENT-GUID]"), 1.5);
// upFilterCtrlRangeof | upFilterCtrlCalendar
// set from current date - 5 days until now
Browser.setValue(getElement("[ELEMENT-GUID]"), {from: (new Date()).add("d",-5), to: new Date()});
Browser.setValue(getElement("[ELEMENT-GUID]"), {from: ",,-5,,,", to: ",,,,,"});
// upFilterCtrlOperator
Browser.setValue(getElement("[ELEMENT-GUID]"), {datafield: "datafieldXY", operator: "contains", search: "test"});