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> 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> getGuid()

Generates and returns a new GUID.

Returns:

guid

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>
self.location.search
Returns:
Type
String | Boolean

<static> getQsValues(queryString)

Get Object with url querystring parameters.

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

<static> getUpObject(element)

Returns the upObject of an element. Element can be selected either by id, guid, by sizzle selector or passed directly as html element.

Parameters:
Name Type Description
element Object
Returns:
Type
upObject

<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> sanitize(value)

Converts HTML special characters to their corresponding HTML entities

e.g. < becomes <, " becomes "

Parameters:
Name Type Description
value String

the raw input string

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> validateEMail(element)

Validates an email address against a regular expression, returns true or false depending on the result of the validation and shows an error message, if the value in control is not a valid email adress

Parameters:
Name Type Description
element HTMLElement
Returns:

status

Type
Boolean

<static> writeLocalString(element, value [, fireEvent])

Creates a local formatted string from an date object or number object and writes it as value into a html control.

Parameters:
Name Type Argument Default Description
element HTMLElement

Reference to an input control of types "date", "time", "date & time", "integer", "float", "currency" (format settings can be appended here, too).

value Number | Date

Value to localize.

fireEvent Boolean <optional>
true
Returns:
Type
Boolean