Issue with two submit buttons

Issue with two submit buttons

HTML FORM looks like below: 

  1. <form id="biz" name="biz" action="CGI.script" method="post" onSubmit="console.log('submit button, not save button, clicked'); if (document.getElementById('field1').value=='$'){alert('Liability is required');return false} else if (document.getElementById('field2').value=='$'){alert('Fee is required'); return false};"> 

  2.         form field 1 
  3.         form field 2 
  4.         form field n 
  5.         ... 
  6.         lots of fields... 


  7.         <input type="submit" id="save-and-continue" name="saveandcontinue" value="Save & Continue" onclick="saveData(this.form);"> &nbsp;&nbsp; 
  8.         <span id="inform" style="color:red"></span> &nbsp;&nbsp; 

  9.         <input type="submit" id="saveform" name="saveform" value="Save & Exit"> 

  10. </form> 


  11. Javascript looks like this: 
  12. <script> 

  13.         function saveData() { 
  14.         // use jQuery to send form save data via ajax call 
  15.         ... 
  16.         // it works fine 
  17.         return false 
  18.         } 

  19. </script> 


Intention: 
As the names suggest, "Save & Continue" is supposed to save the data and the form stays on while "Save & Exit" is supposed to send the form to be processed (and we leave this page). 

Use Scenario and Problem Statement: 
If I load the page and enter some data and click on the "Save & Exit", fine, it works as expected. 
But if I enter/edit data, click on "Save & Continue" (jQuery ajax call works fine to save data and stay on the page), and but then, after more data entry/editing click on "Save & Exit", it triggers the "Save & Continue" event instead of submitting the form and leave the page. 

How can we resolve it? 

Thanks.