We have a script that tracks form submits by adding an event listener to the form. The problem is that one customer submits the form via a link using
<a href="javascript:document.formname.submit();">Submit</a>
which ignores the event listener. Here's a JSFiddle to demonstrate: http://jsfiddle.net/XhLkG/
As you can see the Submit button triggers the alert while the Submit link simply just submits the form and bypasses the event listener.
Is there a way to still trigger the event listener?
EDIT: We cannot change the markup since it's on our customer's homepage where they have embedded our script. Sorry if I didn't make it clear.