All the miscellaneous, non-namespace APIs of Oracle Application Express, including shortcuts to highly used functions are discussed in the following:
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
pNd (DOM Node | string ID)
Returns
(DOM Node | false)
Given a DOM node or string ID (pNd), this function returns the value of an Application Express item in the same format as it would be posted.
Parameters
pNd (DOM Node | string ID)
Given a DOM node or string ID (pNd), this function returns the value of an Application Express item as a string or an array. If the page item type can contain multiple values like a shuttle, checkboxes or a multi select list an array is returned, otherwise a string.
Parameters
pNd (DOM Node | string ID)
Returns
(string|array)
Given a DOM node or string ID (pNd)
, this function sets the Application Express item value taking into account the item type. The pDisplayValue
is optional. If used for a page item of type Popup LOV
where the attribute "Input Field" = "Not Enterable, Show Display Value and Store Return Value"
, it sets the "Input Field"
. The value of pValue
is stored in the hidden return field. The pSuppressChangeEvent
parameter is optional. Passing either false
or not passing this parameter value results in a change event firing for the item being set. Pass true
to prevent the change event from firing for the item being set.
Parameters
pNd (DOM Node | string ID) pValue (String | Array) pDisplayValue(String) pSuppressChangeEvent(Boolean)
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
Array or first value
Returns
Array (DOM Node | string ID | Array)
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
Array
Returns
pNd (DOM Node | string ID | Array)
If pTest
is empty or false
return pDefault
otherwise return pTest
.
Parameters
pTest (String | Array) pDefault (String | Array)
Returns
(string | Array)
Sets a specific style property (pStyle
) to given value (pString
) of a DOM node or DOM node Array (pNd
).
Parameters
pNd (DOM node | string ID | DOM node Array ) pStyle (String) pString (String)
Returns
(DOM node | DOM Array)
Hides a DOM node or array of DOM nodes (pNd
). This also takes into consideration which type of Application Express item is being hidden.
Parameters
pNd (DOM node | string ID | DOM node Array )
Returns
(DOM node | Array)
Shows a DOM node or array of DOM nodes (pNd
). This also takes into consideration which type of Application Express item is being hidden.
Parameters
pNd (DOM node | string ID | DOM node Array )
Returns
(DOM node | Array)
Toggles a DOM node or array of DOM nodes (pNd).
Parameters
pNd (DOM node | string ID | Array)
Returns
(DOM node | Array)
Removes a DOM node or array of DOM nodes.
Parameters
pNd (DOM node | string ID | DOM node Array)
Returns
(DOM Node | Array)
Sets the value (pValue
) of a DOM node or array of DOM nodes (pNd
).
Parameters
pNd (DOM node | string ID | DOM node Array) pValue (String)
Returns
Not applicable.
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
pNd (DOM Node | string ID) String (pToTag) String (pToClass )
Returns
(DOM Node | false)
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
pNd (DOM Node | string ID | Dom node Array) pFunc ['TOGGLE','SHOW','HIDE'] (String )
Returns
Not applicable.
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
pNd (DOM Node | string ID | DON node Array)
Returns
Not applicable.
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
pNd (DOM node | string ID | DOM note Array)
Returns
Not applicable.
Given a page item name (pNd), this function toggles 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
pNd (DOM node | string ID | DOM node ray)
Returns
Not applicable.
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
pNd (DOM node | string ID | DOM node Array) pNdArray (DOM node | String | Array)
Returns
(DOM node | DOM Array)
Hides all sibling nodes of given pNd
.
Parameters
pNd (DOM node | string ID )
Returns
(DOM node)
Shows all sibling DOM nodes of given DOM nodes (pNd
).
Parameters
pNd (DOM node | string ID )
Returns
(DOM node)
Sets a DOM node or array of DOM nodes to a single class name.
Parameters
pNd (DOM node | string ID | DOM node Array) pClass (String)
Returns
Not applicable.
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
pNd (DOM Nnde | string ID) pClass (String) pThisClass (String)
Returns
(DOM node | false)
Returns an array of DOM nodes by a given class name (pClass
). If the pNd
parameter is provided, then the returned elements are all children of that DOM node. Including the pTag
parameter further narrows the list to just return nodes of that tag type.
Parameters
pClass (String) pNd (DOM node | string ID) pTag (String)
Returns
(Array)
Show all the DOM node children of a DOM node (pNd
) that have a specific class (pClass
) and tag (pTag
).
Parameters
pNd (DOM node | string ID) pClass (String) pTag (String)
Returns
Not applicable.
Show all DOM node children of a DOM node (pNd
).
Parameters
pNd (DOM node | string ID)
Returns
Not applicable.
Hide all DOM node children of a DOM node (pNd
).
Parameters
pNd (DOM node | string ID)
Returns
Not applicable.
Disables or enables an item or array of items based on (pTest
).
Parameters
pNd (DOM node | string ID | DOM node array) a (true | false)
Returns
Not applicable.
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 class of all items that are not empty to pClass
.
Parameters
pNd (DOM node | string ID | DOM node Array) Sting (pClassFail) Sting (pClass)
Returns
false, Array Array of all items that are empty (false | Array)
Returns an item value as an array. Useful for multiselects and checkboxes.
Parameters
pId (DOM Node | string ID)
Returns
(Array)
Returns an item value as an array. Useful for radio items and check boxes.
Parameters
pId (DOM node | string ID)
Returns
(Array)
Clears the content of an DOM node or array of DOM nodes and hides them.
Parameters
pNd (DOM node | string ID | DOM node array)
Returns
Not applicable.
Returns the DOM nodes of the selected options of a select item (pNd
).
Parameters
pNd (DOM node | string ID)
Returns
(DOM Array)
Returns the values of the selected options of a select item (pNd
).
Parameters
pNd (DOM node | string ID)
Returns
(DOM Array | String)
Given an array (pArray
) return a string with the values of the array delimited with a given delimiter character (pDelim
).
Parameters
pArray (pArray) pDelim (String)
Returns
Not applicable.
Checks an image (pId
) 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
pId (DOM Node | String) pSearch (pSearch)
Returns
(true | false)
Checks an page item's (pThis
) value against a set of values (pValue
). This function returns true
if any value matches.
Parameters
pThis (DOM node | string ID) pValue (Number | String | Array)
Returns
(true | false)
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
pThis (DOM node | string ID) pThat (DOM node | string ID | DOM node Array ) pValue (Number | String | Array)
Returns
(true | false)
Checks 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
pThis (DOM node | string ID) pThat (DOM node | string ID | DOM node Array ) pValue (Number | String | Array)
Returns
(true | false)
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
pThis (DOM node | string ID) pThat (DOM node | string ID | DOM node Array ) pValue (Number | String | Array)
Returns
(true | false)
Checks the value (pValue
) of an item (pThis
). If it matches, this function shows the table row that holds (pThat
). If it does not match, then the table row is hidden.
Parameters
pThis (DOM node | string ID) pThat (DOM node | string ID | DOM node Array ) pValue (Number | String | Array)
Returns
(true | false)
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
pThis (DOM node | string ID) pValue (String) pThat (DOM node | string ID | DOM node Array )
Returns
(true | false)
Sets a class attribute of an array of nodes that are selected by class.
Parameters
pNd (DOM node | string ID) pClass (String) pTag (String) pClass2 (String)
Returns
(DOM node | DOM node Array)
Collects the values of form items contained within DOM node (pThis
) of class attribute (pClass
) and nodeName (pTag
) and returns an array.
Parameters
pThis (DOM node | string ID) pCLass (String) pTag (String)
Returns
Not applicable.
Returns all form input items contained in a DOM node (pThis
) of a certain type (pType
).
Parameters
pNd (DOM node | string ID) pType (String)
Returns
DOM node Array
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
pThis (DOM node | string ID) pCheck (true | fales) pArray (DOM node array)
Returns
Not applicable.
This function sets all checkboxes located in the first column of a table based on the checked state of the calling check box (pNd
), useful for tabular forms.
Parameters
pNd (DOM node | String)
Returns
DOM node Array
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
pThis (DOM Node | string ID) pNd (DOM Nnde | string iD | DOM node Array)
Returns
(DOM Node)
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
pNd (DOM node | string ID) pSearch (String) pReplace (String)
Returns
(DOM node | false)
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
pNd (DOM node | string ID) pSearch (String)
Returns
(true | fales)
Returns a true
or false
if a string (pText
) contains a substring (pMatch
).
Parameters
pText (String) pMatch (String)
Returns
(true | false)
Use DOM methods to remove all DOM children of DOM node (pND
).
Parameters
pNd (DOM node | string ID)
Returns
Not applicable.
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
pId (DOM node | String) pValue (String)
Returns
Not applicable.
Adds an onload function (func
) without overwriting any previously specified onload functions.
Parameters
pFunction (Javascript Function)
Returns
Not applicable.
Swaps the form values of two form elements (pThis
,pThat
).
Parameters
pThis (DOM Node | String) pThat (DOM Node | String)
Returns
Not applicable.
Sets array of form item (pArray
) to sequential number in multiples of (pMultiple
).
Parameters
pArray (Array) pMultiple (Number)
Returns
Not applicable.
Inserts the html element (pTag
) as a child node of a DOM node (pThis
) with the innerHTML set to (pText
).
Parameters
pThis (DOM node | string ID ) pTag (String) pText (String)
Returns
DOM node
Appends a table cell to a table row (pThis
). And sets the content to (pText
).
Parameters
pThis (DOM node | string ID) pText (String)
Returns
(DOM node)
Appends a table cell to a table row (pThis
). And sets the content to (pText
).
Parameters
pThis (DOM node | string ID) pTest (String)
Returns
DOM node
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
pThis (DOM node | string ID) pType (String) pId (String) pName (String) pValue (String)
Returns
(DOM node)
Takes a DOM node (p_Node
) and makes it a child of DOM node (p_Parent
) and then returns the DOM node (pNode).
Parameters
p_This (DOM node | string ID) p_Parent (DOM node | string ID)
Returns
(DOM node)
Give an table row DOM element (pThis
), this function sets the background of all table cells to a color (pColor
). A global variable gCurrentRow
is set to pThis
.
Parameters
pThis (DOM node | String) pColor(String)
Returns
Not applicable.
Give an table row Dom node (pThis
), this function sets the background of all table cells to NULL
.
Parameters
pThis (DOM Element | String)
Returns
Not applicable.
Sets the value of a form item (pNd) to uppercase.
Parameters
pNd (DOM Node | String)
Returns
Not applicable.
Hides child nodes of a Dom node (pThis
) where the child node's inner HTML matches any instance of pString
. To narrow the child nodes searched by specifying a tag name (pTag
) or a class name (pClass
). Note that the child node is set to a block level element when set to visible.
Parameters
pThis (DOM node | String) pString (String) pTags (String pClass (String)
Returns
Not applicable.