Monitus UI Library

util  4

Monitus UI Library > util > jMUI.util
Search:
 
Filters

static Class jMUI.util

These utilities provide generic utilities for manipulating the DOM, or other general functionalities.

Properties

kbottom_center - final String

Position Bottom Center.
Default Value: "bc"

kbottom_left - final String

Position Bottom Left.
Default Value: "bl"

kbottom_right - final String

Position Bottom Right.
Default Value: "br"

ktop_center - final String

Position Top Center.
Default Value: "tc"

ktop_left - final String

Position Top Left.
Default Value: "tl"

ktop_right - final String

Position Top Right.
Default Value: "tr"

Methods

clock

static null or integer clock ( pClockName, )
Time an operation.

The first time this is called for a unique ID, the clock starts ticking. Ont he second call with the same ID, the clock is stopped, the elapsed time is returned (in milliseconds) and the clock is deleted. So if you call the method a third time with the same ID, a new clock is started.

Parameters:
pClockName, <string> a unique ID
Returns: null or integer
total execution time, in milliseconds

cookie_value

static string cookie_value ( pName , pDefault )
Get the value of a cookie.
Parameters:
pName <string> name of the cookie to get.
pDefault <string> default value, if the cookie value is not found.
Returns: string
the value of the cookie, or the default value if the cookie does not yet exists.

cookies_writable

static bool cookies_writable ( )
Test if you can set cookies.
Returns: bool
whether or not it is possible to write cookies on the current domain.

is_landing_page

static boolean is_landing_page ( pIgnoreDomains )
Find out if the currently viewed page is a landing page.

A page is considered a landing page if it is not on the same domain as the referrer.

Parameters:
pIgnoreDomains <array> a list of domains to ignore; domains in this list will, for all intents and purposes, be considered the same domain as the current domain.
Returns: boolean
is the currently viewed page a landing page?

set_cookie_value

static void set_cookie_value ( pName , pHours , pPath , pDomain , pValue )
Set the value of a cookie, or delete it completely.
Parameters:
pName <string> name of the cookie to set.
pHours <string|number|date> how long should ht ecookie be vlaid for? "-" is forever; "." is no expiry date; "x" deletes the cookie; a number is hte number of hours the cookie is good for
pPath <string> path to set the cookie on.
pDomain <string> domain to set the cookie on.
pValue <string> value of the cookie to set.
Returns: void

url_parameter

static string url_parameter ( pURL , pParameterName , pDefault )
Get a particular parameter from a URL string.
Parameters:
pURL <string> URL string to anlayze.
pParameterName <string> the name of the parameter to extract.
pDefault <string> default value, if the parameter value is not found.
Returns: string
the value of the URL parameter, or the default value if the not found.

wait_object

static void wait_object ( pObjectName , pCallBack , pArguments )
Wait for a javascript object instance to be created in the window.
Parameters:
pObjectName <string> the name of the intance to wait for; basically, the name of the variable.
pCallBack <function> the code to run when the instance is created.
pArguments <array> an array of arguments passed to the callback function.
Returns: void


Copyright © 2017 Yahoo! Inc. All rights reserved.