how to check function value?
<p>consider this code</p>

<pre><code>&lt;input type="button" value="Submit" onclick="checkform(form); someotherfunction();"
</code></pre>

<p>where checkform returns either true or false, the function being used in a form.</p>

<p>how can i check if the <code>checkform()</code> value is false then cancel the input so it dosen't call <code>someotherfunction()</code> and if its true vice versa.</p>

<p>i have tried</p>

<pre><code>&lt;input type="button" value="Submit" onclick="return checkform(form); someotherfunction();"
</code></pre>

<p>which dosen't call <code>someotherfunction()</code> at all because it's returning no matter the value, how can i check if <code>checkform()</code> is true so it can then call <code>someotherfunction()</code>?</p>

<p>i don't want to check the value of <code>checkform()</code> inside <code>someothefunction()</code>, is it possible to check in the <code>&lt;input</code> line?</p>
