最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin6PV0评论

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

Post a comment

comment list (0)

  1. No comments so far