Namespace: Helper

Helper

Helper provides several auxiliary functions for Intrexx.

Methods


<static> containsQsParam(param [, queryString])

Searches for a parameter in a querystring.

Parameters:
Name Type Argument Default Description
param String

Parameter to search for.

queryString String <optional>
window.location

Querystring to search in.

Returns:
Type
Boolean

<static> deleteCookie(param)

Remove a cookie parameter.

Parameters:
Name Type Description
param String
Returns:
Type
Boolean

<static> deleteParamFromQs(param [, queryString])

Removes parameter from a querystring.

Parameters:
Name Type Argument Default Description
param String
queryString String <optional>
window.location
Returns:

url

Type
String | Boolean

<static> deleteParamFromUrl(param, url)

Removes parameter from an url.

Parameters:
Name Type Description
param String
url String
Returns:

url

Type
String

<static> doCharStuffing(list)

Transforms an Array to a string.

"||" is the separator where "|" as escaped with "|0".

Parameters:
Name Type Description
list Array.<Object>
Returns:
Type
String

<static> getBaseUrl()

Get base url.

Returns:

url

Type
String

<static> getCookieValueByParam(param)

Retrieve value of a cookie parameter.

Parameters:
Name Type Description
param String

Cookie parameter to read.

Returns:

value

Type
String | Boolean

<static> getFupId(element)

Get the GUID or ID of functional part, where given element is part of, otherwise empty string.

Parameters:
Name Type Description
element HTMLElement
Returns:
Type
String

<static> getQsValueByParam(param [, queryString])

Get value of a url querystring parameter.

Parameters:
Name Type Argument Default Description
param String

Querystring parameter.

queryString String <optional>
window.location
Returns:
Type
String | Boolean

<static> getQsValues(queryString)

Get Object with url querystring parameters.

Parameters:
Name Type Description
queryString String
Returns:
Type
Object | Boolean

<static> getUrlValueByParam(param [, url])

Get value of a url querystring parameter.

Parameters:
Name Type Argument Default Description
param String

Querystring parameter.

url String <optional>
window.location
Returns:
Type
String | Boolean

<static> getUrlValues(url)

Get name value pairs of a url querystring.

Parameters:
Name Type Description
url String
Returns:
Type
Object | Boolean

<static> hexDecodeString(input)

Decodes a string hexadecimal.

Parameters:
Name Type Description
input String
Returns:
Type
String

<static> hexEncodeString(val)

Encodes a string hexadecimal.

Parameters:
Name Type Description
val String

String to encode.

Returns:
Type
String

<static> htmlEncode(html [, insertNbsp] [, insertBr])

Encodes particular html characters.

Parameters:
Name Type Argument Default Description
html String
insertNbsp Boolean <optional>
false

Shall " " with " " be replaced.

insertBr Boolean <optional>
false

Shall "\n" with "<br>" be replaced.

Returns:
Type
String

<static> isCookieEnabled()

Check, if cookies are enabled.

Returns:
Type
Boolean

<static> mergeQueryStrings( [string1] [, string2])

Merges two query-strings.

Parameters:
Name Type Argument Default Description
string1 String <optional>
""
string2 String <optional>
""
Returns:
Type
String

<static> setCookie(param, value [, expires] [, timeOut])

Changes or adds a cookie parameter.

Parameters:
Name Type Argument Description
param String

New cookie paramter or paramter to change.

value String
expires Boolean <optional>

Shall expire 365 days from now.

timeOut Long <optional>

Time in ms to be added to current year. Overrides expires.

Returns:
Type
Boolean

<static> setQsValueByParam(param [, value] [, queryString] [, encodeHex])

Sets a specified query-string-parameter with a given value to an URL-string that has to be passed to the URL.

Returns a new URL-string with the new query-string-parameter-value.

Parameters:
Name Type Argument Default Description
param String

Querystring parameter to change. Add parameter if not existing already.

value String <optional>
""
queryString String <optional>
window.location
encodeHex Boolean <optional>
Returns:

newQueryString

Type
String | Boolean

<static> setUrlValueByParam(param [, value] [, url])

Changes value of a url querystring parameter.

Adds parameter, if not exists.

Parameters:
Name Type Argument Default Description
param String

Querystring parameter to change. Add parameter if not existing already.

value String <optional>
""
url String <optional>
window.location
Returns:

url

Type
String | Boolean

<static> trim(value)

Trim left and right whitespaces from a string.

Parameters:
Name Type Description
value String
Returns:
Type
String | Boolean

<static> undoCharStuffing(input)

Splits a string to an Array

"||" is used as separator, while "|0" is unescaped to "|".

Parameters:
Name Type Description
input String
Returns:
Type
Array.<String>