我的顶点页面中有一个页面进程。我希望在页面处理完成后重定向到模态拨号页面。所以我写了代码
htp.init;
owa_util.redirect_url('f?p=&APP_ID.:34:APP_SESSION.::NO:34:P34_CODE,P34_DAY_DATE:P30_CODE.,'||:P30_DAY_DT);
apex_application.stop_apex_engine;
第34页是模态拨号页面。因此它显示错误
第34页无法成功呈现。确保第34页上使用的页面模板是模板类型“对话框页面”,并使用适当的JavaScript对话框初始化,对话框关闭和对话框取消代码定义。
然后我尝试了
l_url:=APEX_UTIL.PREPARE_URL('f?p=&APP_ID.:34:APP_SESSION.::NO::P34_CODE,P34_DAY_DATE:P30_CODE.,'||:P30_DAY_DT',p_checksum_type=>'SESSION');
htp.init;
apex_util.redirect_url(l_url);
apex_application.stop_apex_engine;
这对我也没有用。有人有解决方案吗?
答案 0 :(得分:0)
为按钮创建动态操作,在页面进程中复制pl / sql代码,然后在动态操作中添加动作“执行pl / sql代码”。在那里粘贴复制的代码。
#!/usr/bin/env python
# -*- coding: utf-8 -*-
a1 = "A. Inspect desk"
b1 = "B. Open door"
c1 = "C. Turn off lights"
print (a1)
print (b1)
print (c1)
ans1 = raw_input('Type A, B, or C and press enter:')
option_1 = "You find a notebook and a pen; there are illegible markings in the notebook."
option_2 = "You walk up and open the door. Some creature, vaguely humanoid, slams you into the ground and injects your arm \
with something. The creature leaves and you slowly lose consciousness…"
option_3 = ("You turn off the lights. Something or someone opens the door and peers in, it then closes the door. A moment \
passes and you believe the being is gone. You then walk about and encounter a hallway.")
dic1 = {'A': option_1, 'B': option_2, 'C': option_3}
print(dic1[ans1])
在此pl / sql之后,为相同的动态操作创建一个javascript动作并写入
app.use(bodyParser.urlencoded({ extended: true }));
app.post('/pay1',(req,res)=>{
console.log(req._body);
console.log(req.body); // output {'a':'value'}
req.body['new']='other';
console.log(req._body);
console.log(req.body); // {'a':'value','new':"other"}
res.redirect(307,'/pay2');
});
app.post('/pay2',(req,res)=>{
// this request will be in other server, for now I am testing in same server
console.log(req.body); // output {'a':'value'}
res.send('2dsaf');
});
eval()是一个默认的js方法。这将重定向到模态页面