Submit page using dynamic action javascript in Oracle apex - Stack Overflow

I would like to submit the page when I click a button, there are a couple validations I want to do firs

I would like to submit the page when I click a button, there are a couple validations I want to do first and I don't want to use the built in one for it so I'm creating one using javascript dynamic action. Most of it works just fine, just the submit page doesn't execute. Using this documentation.

.2/aexjs/apex.page.html

My code is essentially

if (...){
//some things i want to run first
apex.submit('submit');
alert("aaaa")
}else{
...
}

Everything but the submit as well as the code after submit works just fine. Not too sure what's wrong with it. 

I would like to submit the page when I click a button, there are a couple validations I want to do first and I don't want to use the built in one for it so I'm creating one using javascript dynamic action. Most of it works just fine, just the submit page doesn't execute. Using this documentation.

https://docs.oracle./en/database/oracle/application-express/20.2/aexjs/apex.page.html

My code is essentially

if (...){
//some things i want to run first
apex.submit('submit');
alert("aaaa")
}else{
...
}

Everything but the submit as well as the code after submit works just fine. Not too sure what's wrong with it. 
Share Improve this question asked Jan 7, 2022 at 18:16 J.HJ.H 11 gold badge1 silver badge3 bronze badges 2
  • Works perfectly for me. Just created DA on a button with only apex.submit('submit'); as code and page submits fine. – Koen Lostrie Commented Jan 8, 2022 at 12:19
  • The other thing you could do is apply those "some things" in the client side condition of a Dynamic Action, where the true action includes a declarative Submit action, and the the false actions are your 'else' – Scott Commented Jan 10, 2022 at 0:03
Add a ment  | 

2 Answers 2

Reset to default 0

Are your page processes are executed when page is submitted with the request 'submit'? Also you can try the console of your browser and just execute apex.submit() without any request specified to see if the page is submitted or not.

make any process to execute needed actions

in server side condition area // type => request = value // value => requestName //

then go to your JS code (dynamic action ) and then add this
apex.submit('requestName');

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745624708a4636736.html

相关推荐

  • Submit page using dynamic action javascript in Oracle apex - Stack Overflow

    I would like to submit the page when I click a button, there are a couple validations I want to do firs

    22天前
    80

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信