Submit for and data

Submit for and data


Why does this form not submit data

  1. $(document).on("submit","#evaluateform",function(e){
  2. e.preventDefault()
  3. //$('#evaluateform').serialize();
  4. $.ajax({
  5.   method: "POST",
  6. url: "functions/getRouteEvaluation.php",
  7. data: $("#evaluateform").serialize()
  8. })
  9. .done(function( result ) {
  10.         $("#evaluate-results").html(result);
  11.     }); 
  12. })

my form is like this, it's also loaded via another ajax script so loaded dynamically

  1. <form id="evaluateform">
  2. <input id="depCode" type="text" placeholder="Departure">