jQuery submit button on another button click
<p>I have a submit on my page:</p>

<pre><code>&lt;input type=​"submit" name=​"nextstep" value=​"Next" id=​"nextstep" class=​"newaddressnextstepbutton"&gt;​
</code></pre>

<p>and when I click on this submit I need to make another submit on first button with specific name like this:</p>

<pre><code>&lt;input type="button" name="selectBillingAddress" value="First one" class="selectbillingaddressbutton" onclick="setLocation('/checkout/selectbillingaddress?addressId=537')"&gt;
&lt;input type="button" name="selectBillingAddress" value="Second one" class="selectbillingaddressbutton" onclick="setLocation('/checkout/selectbillingaddress?addressId=647')"&gt;
</code></pre>

<p>I did it like this:</p>

<pre><code>$("input[name='nextstep']").click(function() {
        $("input[name='selectBillingAddress']")[0].submit();
});
</code></pre>

<p>But this not working. I get this error: <code>Uncaught TypeError: $(...)[0].submit is not a function</code>
I found this answer for this error <a href="https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in-javascript">&quot;Submit is not a function&quot; error in JavaScript</a> but I dont have <code>input[name='submit']</code> on this page..</p>

<p>Can anybody help me? </p>