Here is the code I used to accomplish this. Should work for you with no probs. Modify to call you .js file.
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="submitAllForms">Submit</button>
<script type="text/javascript">
var myform;
$.ajax({
url : '//app-ab02.marketo.com/js/forms2/js/forms2.js',
dataType : 'script',
cache : true,
success : function() {
MktoForms2.whenReady(function(form) {
form.onSuccess(function(a,b) {
});
});
}
});
$('#submitAllForms').click(function() {
var forms = MktoForms2.allForms();
$.each(forms, function(i, form) {
form.submit();
});
})
</script>