Javascript - Call a function when i send a from trought an href
<pre><code>&lt;form onSubmit="return loadingArtP();" action="./index.php?status=addarticle" enctype="multipart/form-data" method="post" name="addarticle"&gt;
    // some input parameters
    &lt;a href="javascript:document.addarticle.submit()"&gt;Add&lt;/a&gt;
&lt;/form&gt;
</code></pre>

<p>When i click on "Add" i need to call the loadingArtP() function before send the form, but it doesnt work. How can do it?</p>
