Hi All,
To get the value of a page item using JS/JQ; I've the following two options. Both are giving results; but I think there is a subtle difference between them.
(1) getValue()
apex.item("P1_ITEM").getValue() : Returns the current value of an Application Express item on a page, taking into account the current item type. This does not return the item's current value from session state (although that could be the same), rather it will return the value as it is on the current page.
My Inference : It'll return the value from DOM (Browser Memory).
(2) $v( pNd )
$v("P1_ITEM") : which returns an item's value, but in the format it will be posted.
My Inference : It'll return the value from DOM (Browser Memory) if not posted/submitted; otherwise it'll return the value from Session State.
Question
(1) Are they same or there's a difference.
(2) I tried to come up with an example showing the difference between the two approaches; but couldn't. Can anyone help.
Thanx.