title: CodeIgniter: jQuery post and load next page
body: <p>I am successfully able to save the input value using ajax post but it is not loading the next page.</p>
  
  <p>Client Side code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function notifyEmail() {
  
        var form_data = {
                    'email':$('#inviteEmail').val()
                  };
          alert($('#inviteEmail').val());
        $.ajax({
                    url: "&lt;?php echo site_url('main/email_invites'); ?&gt;",
                    type: 'POST',
                    data: form_data,
                    success: function(msg) {
                      return true;
                    }
              });
      }
    &lt;/script&gt;
  
  &lt;input type='text' id='inviteEmail' placeholder='Enter email'/&gt;
          &lt;a href='#' name='email' id='invite-all' onclick='notifyEmail();' class='btn'&gt;Notify Me&lt;/a&gt;
  </code></pre>
  
  <p>Controller Code:</p>
  
  <pre><code>function email_invites()
      {
          $this-&gt;load-&gt;model('emailInvites');
          if($query = $this-&gt;emailInvites-&gt;saveEmailInvite())
          {
                  $this-&gt;load-&gt;view('emailInvites');
  
          }
      }
  </code></pre>