how to get a link to submit form with other script attached.

how to get a link to submit form with other script attached.

hi i am very new to jquery (and to be honest, not a whiz with javascript either).
i am trying to submit a form through a link. the form is generated through my shopping cart. the form has a submit buttion with an onsubmit="return check_add_to_cart(this, false)" attribute for validation. the function resides in an externally linked .js file. that all works fine.

what i want to do is on the same page have a link that triggers the form submission. I am using this code:

$("a.addcart").click(function (){
      $("form")[1].submit();
      return false;
    });

that works too, with no firebug errors. except that the check_add_to_cart(this, false) doesnt fire and then the person is redirected away from adding his product to the cart to an error page.

i tried adding the add_to_cart function to my function above, but then i get an error that its an undefined function, despite the fact that it is being loaded.

any help woud be much appreciated!!!
thanks MM