Is it possible to intercept a form submission and change the action to a different URL before letting the submission proceed? All kinds of form submission should be intercepted (user clicking on button, javascript call, whatever).
Edit: all solutions using the onsubmit event aren't good because, as stated here, the event isn't triggered when calling submit():
The form's onsubmit event handler (for example, onsubmit="return false;") will not be triggered when invoking this method from Gecko-based applications.
So for example
document.forms["myform"].submit()
won't trigger the event.