title: jQuery Ajax call on HTTPS
body: <p>I have a form that takes three steps to fill it.
  At each of these steps you fill some info, click "Next" and then see either errors you have to fix in order to get to the next step or if there are no errors it takes you to the next step (change "display" to "block" in CSS).</p>
  
  <p>At first step it uses $.ajax() to call file <strong>lib/ajax.php</strong> which returns some results in JSON that matter a lot to filling the rest of the form.
  The thing is this works locally on my <a href="http://my.dev" rel="nofollow">http://my.dev</a> address, but live on <a href="https://something.example.com" rel="nofollow">https://something.example.com</a> it does not.</p>
  
  <p>Where should I first try looking to go about it? What are the most common workarounds on this?</p>
  
  <p>Both <strong>lib/ajax.php</strong> and the <strong>index.php</strong> file (that has the jQuery call) are on the same domain (<a href="https://something.example.com" rel="nofollow">https://something.example.com</a>) so we are not talking about cross-domain calls.</p>
  
  <p>Here's some of the code.</p>
  
  <pre><code>$.ajax({
     type: 'GET',
     url: 'lib/ajax.php', 
     async: false,
     data: {id: id}, 
     dataType: 'json', // what type of data do we expect back from the server
     }).done(function(data){
         // do stuff with data
  });
  </code></pre>
  
  <p>and the <strong>lib/ajax.php</strong></p>
  
  <pre><code>//stuff with db and retrieving row by id
  header('Content-type: application/json');
  
  echo json_encode($result);
  </code></pre>
  
  <p>That's pretty much it. It doesn't work when I place it on live HTTPS server.</p>