Javascript how to stop form from submitting
<p>anyone has any ideas how to stop jsp pages from submitting? I'm using java spring 2.0. And I'm using form controller, so when i click the submit button then it goes to the validation method.</p>

<p>here the submit button:</p>

<pre><code>&lt;input type="submit" name="_target" value="Next" onClick="next()" 
</code></pre>

<p>My plan is, i put the confirmation in my javascript, if confirm is 'OK' then it will do nothing. But at my current situation, it always goes to validae controller immediately. </p>

<p>Thanks for your helps.</p>