in HTML5, there is the form attribute. Basically
Since all projects has included jquery 100% :) you can define in external or any included js file the on document ready function to catch the submit button clicked outsiie form by catching all forms id starting with form- so it catch forms on different page with different names so you do not have to repeat the very same jquery code snipet