Professional Documents
Culture Documents
Oracle APEX: Syntax and Shortcut For The Functions Within The "Apex - Item" Javascript Namespace
Oracle APEX: Syntax and Shortcut For The Functions Within The "Apex - Item" Javascript Namespace
Notes
Syntax and shortcut for the functions within the "apex.item" Javascript
namespace.
1. Retrieve an item value
apex.item('P9_EMPNO').getValue()
$v('P9_EMPNO')
x = $v("P2_TEXT_FIELD");
y = $v("P2_DISPLAY_ONLY");
$x("P9_ENAME").value;
myArr = $v2("P9_MGR");
for (idx=0; idx < myArr.length; idx++) {
//do something with myArr[idx];
}
8. setFocus
9. setStyle
apex.item("P9_SAL").setStyle({"background-color":"Yellow",
"font-weight":"bold"});
$x determines whether an item with the given name exists on the current
page.
5 Different Ways to Set Oracle APEX Page Item Value using Javascript
$("#P28_SECOND" ).val(20);
$x("P28_SECOND").value = 30;
document.getElementById('P28_SECOND').value=40;
apex.item('P28_SECOND').setValue(50);
apex.items.P28_SECOND.value=60;