title: What does "return false;" do?
body: <p>I wrote a webpage where a user can enter a log entry that is stored on a database and then retrieved and printed on the page using <code>ajax</code>. I am still quite new to <code>ajax</code> and was wondering if somebody could please explain to me what does <code>return false;</code> do at the end of my code? and is it even necessary? </p>
  
  <p>If I put the second ajax code after the <code>return false</code> the code does not work! can you please explain to me why?</p>
  
  <pre><code>//handles submitting the form without reloading page 
  $('#FormSubmit').submit(function(e) {
      //stores the input of today's data
      var log_entry = $("#LogEntry").val();
      // prevent the form from submitting normally
      e.preventDefault();
  
      $.ajax({
          type: 'POST',
          url: 'behind_curtains.php',
          data: {
              logentry: log_entry
          },
          success: function() {
              alert(log_entry);
              //clears textbox after submission
              $('#LogEntry').val("");
              //presents successs text and then fades it out
              $("#entered-log-success").html("Your Entry has been entered.");
              $("#entered-log-success").show().fadeOut(3000);
          }
      });
      //prints new log entries on page upon submittion
      $.ajax({
          type: 'POST',
          url: '/wp-content/themes/childOfFanwood/traininglog_behind_curtains.php',
          data: {
              log_entries_loop: "true"
          },
          success: function(data) {
              alert(data);
              $("#log-entry-container").html("");
              $("#log-entry-container").html(data);
          }
      });
      return false;
  });
  ​
  </code></pre>