I am using Oracle Apex 5. On the page i have two items that are filled out (dynamic actions automatically refresh an interactive report based on the values of those two items).
Also i have a button PRINT which is supposed to open a new page and send the values of the two items. Since i want this new page to open in a new window(tab) i am doing it by making the action of the button redirect to url and entering this Javascript in the url:
javascript:var myWindow = window.open('f p=800:105:&APP_SESSION.::NO::REP_NAME,PAR1_NAME,PAR1_VAL,PAR2_NAME,PAR2_VAL:NarudzbenicaDobavljacV2,P_ACCOUNT_ID,&P15_SUPLIER_ID.,P_DATE,&P15_DATE.');
Here is the catch! The function doesn't pick up the values. Only after a page submit or refresh (F5) does it work. How to make it work without having to do this?
I also tried making the button a submit page action and adding an after submit branch with the same javascript, but this just throws a 500 error.