I'm building some functionality that requires some Javascript processing to validate the page before it is submitted and prevent the submit if there are errors. I have got this working using a dynamic action that fires Before Page Submit with a Javascript firing condition and a Cancel Event action, and it works just fine. However, the intention is to use this functionality in several pages and it would be nicer if the functionality could be implemented in pure Javascript (e.g. code in page template).
According to https://api.jquery.com/submit/ this should be possible:
$( "#wwvFlowForm" ).submit(function( event ) {
alert( "Handler for .submit() called." );
However I can't get it to work in APEX. Can anyone suggest a solution?