Since you are using jQuery, just use $() to select the form element and call submit on it; move all this to the anchor via $() to find the anchor and click to connect the handler:
$("selector_for_the_anchor").click(function() { $("selector_for_the_form").submit(); return false; });
Probably best is return false; cancel click on the anchor.
Off topic . But note that this makes your page completely unusable without JavaScript, and also makes it confusing even for JavaScript-enabled browsers used by users who need assistive technologies (firmware, etc.). This makes markup completely meaningless. . But since you clearly said that this is exactly what you wanted to do ...
source share