Oracle Apex 5 Opening page in new window

别说谁变了你拦得住时间么 提交于 2019-12-22 23:28:20

问题


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.


回答1:


In javascript you need to use the function $v() to get the item value. The &PX_ITEM. notation doesn't work like that, this uses the session values stored in the database (which are set upon page submition or by a pl/sql block setting the session state). You need to set the url like this:

javascript:var myWindow = window.open('f?p=800:105:&SESSION.::NO::REP_NAME,PAR1_NAME,PAR1_VAL,PAR2_NAME,PAR2_VAL:NarudzbenicaDobavljacV2,' + $v('P_ACCOUNT_ID') + ',' + $v('P15_SUPLIER_ID') +',' +$v('P_DATE') + ',' + $v('P15_DATE')');



回答2:


If this question is still open try this:

javascript:var myWindow = window.open('f?p=800:105:&SESSION.::NO::REP_NAME,PAR1_NAME,PAR1_VAL,PAR2_NAME,PAR2_VAL:NarudzbenicaDobavljacV2,P_ACCOUNT_ID,' + $v("P15_SUPLIER_ID") +',P_DATE,' + $v("P15_DATE"));


来源:https://stackoverflow.com/questions/39411560/oracle-apex-5-opening-page-in-new-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!