title: Why is this Jquery not posting?
body: <pre><code>**HTML**
  &lt;form name="dataPost" method="post" id="dataPost"&gt;
       &lt;input name="startdate" type="text" data-format="MM/dd/yyyy hh:mm:ss" id="startdate" title="Start Date of Report" value="&lt;?php echo Base_Date::sqlToMDYSlashesWithTime($timezone); ?&gt;"  /&gt;
       &lt;input name="enddate" type="text" data-format="MM/dd/yyyy hh:mm:ss"  id="enddate" title="End Date of Report" value="&lt;?php echo Base_Date::sqlToMDYSlashesWithTime($timezone); ?&gt;"  /&gt;
       &lt;select name="cduid" multiple="multiple" style="height: 200px;" id="cduid"&gt;
   &lt;?php foreach($energyStores as $energyStore) { ?&gt;
   &lt;option value="&lt;?php echo $energyStore['energystore_cduid'] ?&gt;"&gt;&lt;?php echo $energyStore['energystore_cduid'] ?&gt;&lt;/option&gt;
   &lt;?php } ?&gt;
   &lt;/select&gt;
   &lt;input name="generate" type='submit' id="generate" class="btn btn-primary" value="Generate Report" onClick="" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Jquery</strong></p>
  
  <pre><code>$("#dataPost").submit(function(){
      var startdate = $('#startdate').val();
      var enddate = $('#enddate').val();
      var cduid = $('#cduid').val();
      console.log (startdate, enddate, cduid);
      $.ajax({
         url: '../process/create_detail_cashbook_html.php',
         type:'POST',
         data: {startdate:startdate, enddate:enddate, cduid:cduid}   
      }).done(function(data) {
      });
     return false;
  });
  </code></pre>
  
  <p>On hitting submit button none of my data is being posted. As I am new to all of this I struggle to understand other peoples code sorry if this is a duplicate.</p>
  
  <p>This is what I have so far, the php page that loads is looking for this data but is not finding it.</p>