简体   繁体   English

Oracle Apex 5 Opening页面在新窗口中

[英]Oracle Apex 5 Opening page in new window

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). 我正在使用Oracle Apex5。在页面上,我填写了两个项目(动态操作将基于这两个项目的值自动刷新交互式报表)。

Also i have a button PRINT which is supposed to open a new page and send the values of the two items. 我也有一个按钮PRINT,应该打开一个新页面并发送两个项目的值。 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: 由于我希望这个新页面在新窗口(选项卡)中打开,因此我通过将按钮的操作重定向到url并在url中输入此Javascript来做到这一点:

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. 仅在页面提交或刷新(F5)后才起作用。 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. 我也尝试将按钮设为提交页面操作,并使用相同的javascript添加一个after Submit分支,但这只会引发500错误。

In javascript you need to use the function $v() to get the item value. 在javascript中,您需要使用$ v()函数来获取商品值。 The &PX_ITEM. &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 ). 表示法不是那样工作的,它使用存储在数据库中的会话值(这些值在页面提交时设置,或者由设置会话状态的pl / sql块设置)。 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')');

如果此问题仍然存在,请尝试以下操作:

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"));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM