title: Check whether form is submitted or not
body: <p>In my webpage a form is there with submit button (id = search) and predict button(id = predict). If user doesn't submit form, but clicks predict button it must alert form is not submitted. How to check whether form is submitted or not in JQuery.</p>
  
  <pre><code>$(document).ready(function(){ 
         $('#Predict').click(function(){
           if($('#search').submit()) {            
               window.open("ouput.php");
  
            }
  
        else {  
          alert("Please click search or upload button first \n\
               and then click Predict "); 
           }
      });
  });
  </code></pre>
  
  <p>But alert box is not appearing and also even if form is not submitted ouput.php page is opening.</p>