Is it possible to have JavaScript code in the PL/SQL block. I want to execute the pl/sql block containing JavaScript code on submit in oracle Apex page process.
DECLARE
v_count NUMBER;
BEGIN
select count(*) into v_count
from summary
where prd_items = 'Total';
HTP.p ('<script type="text/javascript">');
HTP.p ( 'alert(''The value of Total for BU is ' ||v_count|| '.\n'
|| 'You have to enter correct values to proceed further \n'');');
HTP.p ('</script>');
END;
I have Submit
button in my page region and this pl/sql block is page processing item and execute on page submit(Conditional:Submit
).
But I am not able to pop-up the alert box. Please advise.
Thank you.