title: jQuery post returns no response data
body: <p>I have this code</p>
  
  <pre><code>$(document).delegate('#login', 'pageinit', function(event) {
  
  console.log('inside login page')
  $('#loginform').submit(function() {
  
      // Get the value of the username and password
      var myusername = $("#username").val();
      var mypassword = $("#password").val();
  
      // Post to the login route
      $.post(global_urlstub + '/customer_login', {username: myusername, password: mypassword}, function(data) {
  
          alert(data);
          console.log(data);
          if (data.flag == true) {
              alert('123');
              console.log(data);
              jQuery.mobile.changePage('#page1');
          }
          else {
              alert('12345');
              console.log(data);
              $('#errmsg_login').html(data.msg);
          }
  
      }, "json" );
  
      return false;
  
  });
  </code></pre>
  
  <p>});</p>
  
  <p>My server returns hash with key <code>flag</code>. However this code returns me no data to console or alert ,  while post request is successful. What am i doing wrong?</p>