I am trying to set the value and the session state with Javascript in oracle apex. Here my function that I call:
function setItemValue(node) {
$s('P2020_SELECTED', node);
apex.server.process ('MY_PROCESS', {
p_arg_name: 'P2020_SELECTED',
p_arg_value: node
});
}
The display value (Line 2) will be set but the session state not. I get this error on page load in apex.
Error: SyntaxError: Unexpected token P in JSON at position 0
Try this:
function setItemValue(node) {
$s('P2020_SELECTED', node);
apex.server.process('MY_PROCESS',{
pageItems: '#P2020_SELECTED'
},{dataType: "text"});
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With