Clears the content of a DOM node or array of DOM nodes and hides them.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | The node(s) to clear and hide. |
Inserts the html form input element (pType) as a child node of a DOM node (pThis) with an id (pId) and name (pName) value set to (pValue).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pThis |
Element | string | ||
pType |
String |
<optional> |
The input type. The default is "text". |
pId |
String |
<optional> |
The input element id. |
pName |
String |
<optional> |
The input element name. |
pValue |
String |
<optional> |
The input element value. |
Returns:
The element inserted.
- Type
- Element
Inserts the html element (pTag) as a child node of a DOM node (pThis) with the innerHTML set to (pText).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pThis |
Element | string | The DOM node to append the new element to. | |
pTag |
String |
<optional> |
The new element tag. |
pText |
String |
<optional> |
The new element content. |
Returns:
The DOM node inserted.
- Type
- Element
Takes a DOM node (p_Node) and makes it a child of DOM node (p_Parent) and then returns the DOM node (pNode).
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | DOM node or string ID |
pParent |
Element | string | DOM node or string ID |
Returns:
- Type
- Element
Check or uncheck (pCheck) all check boxes contained within a DOM node (pThis). If an array of checkboxes DOM nodes (pArray) is provided, use that array for affected check boxes.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | The DOM node or string id of the DOM node that contains the checkboxes. |
pCheck |
boolean | true to check and false to uncheck. |
pArray |
Array.<Element> | Checkbox elements. |
This function sets all checkboxes located in the first column of a table based on the checked state of the calling checkbox (pNd), useful for tabular forms.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | String |
Returns:
- Type
- Array.<Element>
Checks the value (pValue) of an item (pThis). If it matches, this function disables the item or array of items (pThat). If it does not match, then the item is enabled.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pValue |
String | |
pThat |
Element | string | Array.<Element> |
Returns:
- Type
- boolean
Checks an item or an array of items to see if any are empty, set the class of all items that are empty to pClassFail, set the the class of all items that are not empty to pClass.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | Array.<Element> | ||
pClassFail |
String |
<optional> |
|
pClass |
String |
<optional> |
Returns:
Array of all items that are empty
- Type
- false | Array
Checks page item’s (pThis) value against a value (pValue). If it matches, a DOM node (pThat) is set to hidden. If it does not match, then the DOM node (pThat) is set to visible.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pThat |
Element | string | Array.<Element> | |
pValue |
Number | String | Array |
Returns:
- Type
- boolean
Checks the value (pValue) of an item (pThis). If it matches, this function hides the table row that holds (pThat). If it does not match, then the table row is shown.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pThat |
Element | string | Array.<Element> | |
pValue |
Number | String | Array |
Returns:
- Type
- boolean
Returns an item value as an array. Useful for radio items and checkboxes.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Array
Returns the DOM nodes of the selected options of a select item (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
The selected option elements or false if none selected.
- Type
- Array.<Element> | Element | false
Returns the values of the selected options of a select item (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Array | String
Sets array of form items (pArray) values to sequential number in multiples of (pMultiple).
Parameters:
Name | Type | Description |
---|---|---|
pArray |
Array.<Element> | |
pMultiple |
String | Number |
Checks an page item’s (pThis) value against a value (pValue). If it matches, a DOM node (pThat) is set to visible. If it does not match, then the DOM node (pThat) is set to hidden.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pThat |
Element | string | Array.<Element> | |
pValue |
Number | String | Array |
Returns:
- Type
- boolean
Checks the value (pValue) of an item (pThis). If it matches, the function shows the table row that holds pThat. If it does not match then the table row is hidden.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pThat |
Element | string | Array.<Element> | |
pValue |
Number | String | Array |
Returns:
- Type
- boolean
Swaps the form values of two form elements (pThis,pThat).
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | String | Element or string id for first form element. |
pThat |
Element | String | Element or string id for second form element. |
Collects the values of form items contained within DOM node (pThis) of class attribute (pClass) and nodeName (pTag) and returns an array.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pClass |
String | |
pTag |
String |
Returns:
The collected values.
- Type
- Array.<String>
If pTest is empty or false return pDefault otherwise return pTest.
Parameters:
Name | Type | Description |
---|---|---|
pTest |
* | |
pDefault |
* |
Returns:
- Type
- *
Given a DOM node or string ID (pNd), this function sets the APEX item value taking into account the item type.
This is a shortcut for item#setValue. See setValue documentation for details.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | The DOM node or string id of the item to set the value on. | |
pValue |
string | Array.<string> | The value to set. For items that support multiple values (for example a 'Shuttle'), an array of string values can be passed to set multiple values at once. | |
pDisplayValue |
string |
<optional> |
The display value only if different from pValue and can't be determined by the item itself. For example for the item type Popup LOV, with the attribute Input Field = 'Not Enterable, Show Display Value and Store Return Value', this value sets the Input Field display value. The value of pValue is used to set the item's hidden return field. |
pSuppressChangeEvent |
boolean |
<optional> |
Pass true to prevent the change event from being triggered for the item being set. The default is false. |
Appends a table cell <td> to a table row (pThis). And sets the content to (pText).
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pText |
String |
Returns:
- Type
- Element
Appends a table header cell <th> to a table row (pThis). And sets the content to (pText).
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pText |
String |
Returns:
- Type
- Element
Given a DOM node or string ID or an array (pNd), this function returns an array. Used for creating DOM based
functionality that can accept a single or multiple DOM nodes.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array |
Returns:
- Type
- Array
Given a DOM node or string ID or an array (pNd), this function returns a single value, if an pNd is an array but
only has one element the value of that element is returned otherwise the array is returned. Used for creating
DOM based functionality that can accept a single or multiple DOM nodes.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array |
Returns:
Array or first value
- Type
- Array
Given a DOM node or string ID (pNd), this function returns the value of an APEX item in the same format as it would be posted.
See item#getValue for more details.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Given a DOM node or string ID (pNd), this function returns the value of an APEX item as a string or an array if the item type
can contain multiple values. For example checkbox or multi select list.
See item#getValue for more details.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns an item value as an array. Useful for multiselects and checkboxs.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Array
Checks an page item’s (pThis) value against a set of values (pValue). This function returns true if any value matches.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pValue |
Number | String | Array |
Returns:
- Type
- boolean
Sets the value of a form element (pNd) to uppercase. Note this does not go through the item setValue method so this
will not work with all item types or trigger a change event.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | String |
Given a DOM node or string ID (pNd), this function returns a DOM node if the element is on the page, or returns false if it is not.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Element | false
Returns an array of DOM nodes by a given class name (pClass). If the pNd parameter is provided, then the returned elements will be all be children of that DOM node. Including the pTag parameter further narrows the list to just return nodes of that tag type.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pClass |
String | ||
pNd |
Element | string |
<optional> |
|
pTag |
String |
<optional> |
Returns:
- Type
- Array
Checks an image (pNd) source attribute for a substring (pSearch). The function returns true if a substring (pSearch) is found. It returns false if a substring (pSearch) is not found.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | |
pSearch |
String |
Returns:
- Type
- boolean
Sets the className of a DOM node or array of DOM nodes to class (pClass).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pClass |
String | The class name to set. Any other class names will be overwritten. |
Returns:
- Type
- Element | Array.<Element>
Sets the className of an array of nodes that are selected by (pNd), (pClass) and (pTag) to class (pClass2).
See $x_ByClass and $x_Class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | ||
pClass |
String | ||
pTag |
String |
<optional> |
|
pClass2 |
String |
<optional> |
Returns:
- Type
- Element | Array.<Element>
Disables or enables an item or array of items based on (pTest).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pTest |
boolean |
Returns all form input items contained in a DOM node (pNd) of the given type (pType).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | |
pType |
String |
Returns:
- Type
- Array.<Element>
Hides a DOM node or array of DOM nodes (pNd). This also takes into consideration which type of APEX item is being hidden.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Returns:
- Type
- Element | Array
Hides all DOM nodes referenced in pNdArray and then shows the DOM node referenced by pNd. This is most useful when pNd is also a node in pNdArray.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pNdArray |
Element | String | Array |
Returns:
- Type
- Element | Array.<Element>
Hide all all DOM node children of a DOM node (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Given a page item name, this function hides the entire row that holds the item.
In most cases, this is the item and its label. This function only works in table
layouts since it explicitly looks for a containing tr element.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Hides all sibling nodes of given DOM node (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Array.<Element>
Given DOM node or array of DOM nodes, this function (shows, hides, or toggles) the entire row that contains
the DOM node or array of DOM nodes. This is most useful when using Page Items. This function only works in
table layouts since it explicitly looks for a containing tr element.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pFunc |
String | One of 'TOGGLE', 'SHOW', 'HIDE' |
Removes a DOM node or array of DOM nodes.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Returns:
- Type
- Element | Array
Give an table row DOM node (pThis), this function sets the background of all table cells to a color (pColor). A global variable gCurrentRow is set to the current table row (pThis).
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | String | |
pColor |
String |
Give an table row DOM node (pThis), this function clears the background of all table cells.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | String |
Sets the class (pClass) of all DOM node siblings of a node (pNd). If pNdClass is not null the class of pNd is set to pNdClass.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | ||
pClass |
String | ||
pNdClass |
String |
<optional> |
Returns:
- Type
- Array.<Element>
Shows a DOM node or array of DOM nodes (pNd). This also takes into consideration which type of APEX item is being shown.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Returns:
- Type
- Element | Array
Show all the DOM node children of a DOM node (pNd) that have a specific class (pClass) and tag (pTag).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | ||
pClass |
String | ||
pTag |
String |
<optional> |
Show all all DOM node children of a DOM node (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Given a page item name, this function shows the entire row that holds the item.
In most cases, this is the item and its label. This function only works in table
layouts since it explicitly looks for a containing tr element.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Shows all sibling DOM nodes of given DOM nodes (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Returns:
- Type
- Array.<Element>
Sets a specific style property (pStyle) to given value (pString) of a DOM node or DOM node Array (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pStyle |
String | |
pString |
String |
Returns:
- Type
- Element | Array.<Element>
Checks an image (pId) src attribute for a substring (pSearch). If a substring is found, this function replaces the image entire src attribute with (pReplace).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | |
pSearch |
String | |
pReplace |
String |
Returns:
- Type
- Element | false
Toggles (shows or hides) a DOM node or array of DOM nodes (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Returns:
- Type
- Element | Array
Given a page item name (pNd), this function toggles (shows or hides) the entire row that holds the item.
In most cases, this is the item and its label. This function only works in table
layouts since it explicitly looks for a containing tr element.
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> |
Given an image element (pThis) and a DOM node (pNd), this function toggles the display of the DOM node (pNd).
The src attribute of the image element (pThis) is rewritten. The image src has any plus substrings replaced
with minus substrings or minus substrings are replaced with plus substrings.
Parameters:
Name | Type | Description |
---|---|---|
pThis |
Element | string | |
pNd |
Element | string | Array.<Element> |
Returns:
- Type
- Element
Starting from a DOM node (pNd), this function cascades up the DOM tree until the tag of node name (pToTag) is found.
If the optional pToClass is present, the ancestor node must have a node name that equals pToTag and the class must equal pToClass.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pNd |
Element | string | ||
pToTag |
String | ||
pToClass |
String |
<optional> |
Returns:
The matching DOM node found and false otherwise.
- Type
- Element | false
Sets the value (pValue) of a DOM node or array of DOM nodes (pNd).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string | Array.<Element> | |
pValue |
String |
Use DOM methods to remove all DOM children of DOM node (pND).
Parameters:
Name | Type | Description |
---|---|---|
pNd |
Element | string |
Sets the value (pValue) of a select item (pId). If the value is not found, this functions selects the first option (usually the NULL selection).
Parameters:
Name | Type | Description |
---|---|---|
pId |
Element | String | |
pValue |
String |