Please, provide the jscript code to understand better what is your issue.
Always provide informations about your environment for a suitable approach to your use case.
Jorgelina1 has a point here. Why do you have two steps for JQuery ?
Nevertheless depending on your apex Version you could use a true action of type confirm on on your dynamic action :
Confirm: Displays a confirmation dialog, with Cancel and Ok buttons. If the user chooses Cancel then the proceeding actions are not executed and the current event is canceled.
something like bellow should do the trick
After all, I wrote that I want to display the confirmation when the value entered exceeds the tolerance.
:P1_MIN = 100;
:P2_MAX = 200;
:P1_VALUE value and enter key:
1. if the value is not in tolerance, display the question whether to continue ("Tolerance range exceeded, min = 100 and max = 200! Should you continue?") (display a question whether to continue when P1_VALUE is not between P1_MIN and P1_MAX)
2a. if the answer is yes,
2b. save the data in the database
the problem is with point 2b, another problem is that the window with the question should have the default "Cancel" button instead of "OK"
How are you saving your data, through a PL/SQL? If so... I have a recommendation.
On your jscript confirmation request " Do you want to continue? "
If NO => proceed normally and nothing will happen If YES => execute a $.event.trigger("SaveToDatabase")
You would have, FIRST, to create a CUSTOM DA. The CUSTOM value should be "SaveToDatabase", and the Jquery identifier be "body".
In that DA, specify the PL/SQL you will use to save the data into the database, or a jscript call with an apex.submit("PROCESS_TO_SAVE_DATA"), where you would have to have a process that should work only wnen request is "PROCESS_TO_SAVE_DATA"...
Does this make sense?