title: Javascript to continue or cancel the submit button
body: <p>My jsp has this code:</p>
  
  <pre><code>&lt;input type="submit" value="Transfer ULD" onclick="doSomething();" name="_eventId_transferULDTransition"/&gt;
  </code></pre>
  
  <p><code>doSomething()</code> is a javascript method</p>
  
  <pre><code>function doSomething() {    
      var transferType = document.getElementById('equipmentType').value;
      if(${uldSelector.baseLoadToUse.uldEquipType} == 02 &amp;&amp; 
          (transferType == 01 || transferType == 13 || transferType == 07)){
          var r = confirm("Still want to tranfer Air Container?");
          if (r == true) {
              return true;
          } else {
              return false;
          }
      }
  }
  </code></pre>
  
  <p>I have 4 to 5 conditions in the method..</p>
  
  <p>When user clicks on 'OK' it should continue and on 'CANCEL' it should not...</p>
  
  <p>But, It submits on both cases..using spring webflow, spring MVC and Java.</p>
  
  <p>Any suggestions are appreciated! Thanks!</p>