new HelperMain()
Methods
-
containsQsParam(p_strParam, p_strQs) → {Boolean}
-
Searches for a parameter in a querystring
Parameters:
Name Type Description p_strParam
String Parameter to search for
p_strQs
String Querystring to search in
Returns:
true
if searchstring was found- Type
- Boolean
-
deleteCookie(p_strParam)
-
Deletes a cookie parameter.
Parameters:
Name Type Description p_strParam
String Cookie parameter to delete.
-
deleteParamFromQs(p_strParam, p_strUrl)
-
Deletes parameter from a querystring.
Parameters:
Name Type Description p_strParam
Querystring parameter to delete.
p_strUrl
Querystring. If not set, querystring of current page is used.
Returns:
New querystring.
-
deleteParamFromUrl(p_strParam, p_strUrl)
-
Deletes parameter from an url.
Parameters:
Name Type Description p_strParam
Parameter to delete.
p_strUrl
Url
Returns:
New url.
-
doCharStuffing(Array) → {string}
-
Transforms an array to a string; "||" is the separator; "|" as value is marked as "|0".
Parameters:
Name Type Description Array
array to stuff.
Returns:
Stuffed array entries
- Type
- string
-
getBaseUrl() → {string}
-
Get base url including rq_SId (in case of no cookie).
Returns:
Base url.
- Type
- string
-
getCookieValueByParam(p_strParam) → {String}
-
Gets value of a cookie parameter.
Parameters:
Name Type Description p_strParam
String Cookie parameter to read.
Returns:
Value of cookie paramter,
false
if p_strParam is empty, if no cookie exists or if parameter doesn't exist.- Type
- String
-
getFupId(html) → {string}
-
Get the id of fup, where control is placed.
Parameters:
Name Type Description html
object element
Returns:
Id of fup, where control is placed.
- Type
- string
-
getQsValueByParam(p_strParam, p_strQs)
-
Get value of a url querystring parameter.
Parameters:
Name Type Description p_strParam
String Querystring parameter.
p_strQs
String Querystring. If not set, querystring of current page is used.
Returns:
Parameter value.
False
, if parameter doesn't exist.
-
getQsValues(p_strQs)
-
Get map of a url querystring parameters.
Parameters:
Name Type Description p_strQs
String Querystring. If not set, querystring of current page is used.
Returns:
Map
-
getUrlValueByParam(p_strParam, p_strUrl)
-
Get value of a url querystring parameter.
Parameters:
Name Type Description p_strParam
String Querystring parameter.
p_strUrl
String .
Returns:
Parameter value.
False
, if parameter doesn't exist.
-
getUrlValues(p_strUrl)
-
Get name - value pairs of a url querystring.
Parameters:
Name Type Description p_strUrl
String .
Returns:
Array.
False
, if parameter doesn't exist.
-
hexDecodeString(strInput)
-
Decodes a string hexadecimal.
Parameters:
Name Type Description strInput
String to decode.
Returns:
Decoded string.
-
hexEncodeString(strInput)
-
Encodes a string hexadecimal.
Parameters:
Name Type Description strInput
String to encode.
Returns:
encoded string.
-
htmlEncode(s, bInsertNbsp, bInsertBr) → {String}
-
Encodes particular html characters.
Parameters:
Name Type Description s
String Html string
bInsertNbsp
Boolean Replace " " with " "?
bInsertBr
Boolean Replace "\n" with "<br>"?
Returns:
Encoded html string.
- Type
- String
-
isCookieEnabled()
-
Checks, if cookies are enabled.
Returns:
True
if cookies are enabled, elsefalse
. -
setCookie(p_strParam, p_strValue, bExpire, l_lTimeOut)
-
Changes or adds a cookie parameter.
Parameters:
Name Type Description p_strParam
String New cookie paramter or paramter to change.
p_strValue
String Value of cookie.
bExpire
Boolean 0 = valid for current session, 1 = valid for 1 year.
l_lTimeOut
Long Time in ms to be addded to current year. Overrides bExpire.
Returns:
True
if cookies are enabled, elsefalse
. -
setQsValueByParam(p_strParam, p_strValue, p_strQs, p_bHexEnc)
-
Changes value of a parameter in a querstring. Adds parameter, if it is not already existing.
Parameters:
Name Type Description p_strParam
String Querystring parameter to change. Add parameter if not existing already.
p_strValue
String Value of parameter.
p_strQs
String Querystring. If not set, querystring of current page is used.
p_bHexEnc
Boolean True
to encode hex decoded string.Returns:
New querystring.
-
setUrlValueByParam(p_strParam, p_strValue, p_strUrl)
-
Changes value of a url querystring parameter. Adds parameter, if it is not already existing.
Parameters:
Name Type Description p_strParam
String Querystring parameter to change. Add parameter if not existing already.
p_strValue
String Value of parameter.
p_strUrl
String Url
Returns:
New Url.
-
trim(s)
-
Trim left and right whitespaces from a string.
Parameters:
Name Type Description s
String with potentially whitespaces.
Returns:
String without unneccessary whitespaces.
-
undoCharStuffing(strInput) → {array}
-
Transforms a string to an array; "||" is the separator; "|" as value is marked as "|0".
Parameters:
Name Type Description strInput
string stuffed string value
Returns:
Array
- Type
- array