title: return false not stopping the execution
body: <p>I am invoking a modal dialog which resides in a different location (another controller), into the current page. This modal dialog has an <code>Apply</code> button which should take some data from the grid in the modal dialog and let itself be closed and then populate that data into some place in the current page. This modal dialog is written in such way that after the <code>Apply</code> button is clicked, it redirects to some controller's action method.</p>
  
  <p>From my current page, however, I should take the data from grid and populate it into current page and close the modal dialog. No need for any redirects.</p>
  
  <p>So, to do that I am adding a <code>return false</code> at the end of the <code>click</code> event of the <code>Apply</code> button:</p>
  
  <pre><code>$("body").on("click", "#Apply", function () {
  
      if(true)  // do something 
      else  // do something else 
  
      return false; // this is not being effective
  });
  </code></pre>
  
  <p>The modal dialog has a <code>$.post</code> call to the controller method, which is inadvertently being called even after executing the <code>return false</code> in the current page. The following piece of code is found in the actual modal dialog's (which is actually a Partial View) definition:</p>
  
  <pre><code>$("body").on("click", "#Apply", function () {
  
      if(true)  //do something  
      else  // do something else 
  
      $.post("/ControllerName/ActionMethod", { _someData: someData}, function(data) {
      if (data == "True") { // this particular action method is returning a bool, hence they are checking it like this!
          window.location.href = '@Url.Action("Index", "SomeOtherController")';
      }
  });
  </code></pre>
  
  <p>I also tried <code>event.preventDefault()</code>, but that didn't work either. Actually <code>return false</code> just calls <code>event.preventDefault()</code> and <code>event.stopPropagation()</code> as I just found.</p>
  
  <p>How do I prevent being redirected in this situation? </p>