title: "Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page
body: <p>I've a form which I'm submitting (through GET as it is required this way) to a crm (ViciDial). I can successfully submit the form however if I do that the processing file at crm will just echo a success text and that's it.</p>
  <p>Instead of that text, I want to display a thank-you page on my website, so I decided to use AJAX to submit the form and redirect it to the page I need, however I'm getting this error on my browser:</p>
  <blockquote>
  <p>Mixed Content: The page at 'https://page.com' was loaded over HTTPS,
  but requested an insecure XMLHttpRequest endpoint
  'http://XX.XXX.XX.XXX/vicidial/non_agent_api.php?queries=query=data'.
  This request has been blocked; the content must be served over HTTPS.</p>
  </blockquote>
  <p>This is my AJAX script:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  SubmitFormClickToCall = function(){
              
      jQuery.ajax({
          url: &quot;http://XX.XXX.XX.XX/vicidial/non_agent_api.php&quot;,
          data : jQuery(&quot;#form-click-to-call&quot;).serialize(),
          type : &quot;GET&quot;,
          processData: false,
          contentType: false,
          success: function(data){
              window.location.href = &quot;https://www.example.com/thank-you&quot;;
          }
      });
  }
  &lt;/script&gt;
  </code></pre>
  <p>Just setting https in the URL won't work, is there any way in which I can submit the data via GET and redirect the user to my thankyou page?</p>
  <h1>============================</h1>
  <p>Problem here was mixed content, this means that I loaded a page through HTTPS and was trying to hit via AJAX an API that was in HTTP. But the browser wont allow us to just do that.</p>
  <p>So if you can't set the API to be HTTPS (this was my case) we can still approach this in a different way.</p>
  <p>The Main Problem was not the mixed content issue it was that I wanted to submit data to an API and redirect the users to a fancy thank you page. Instead of using AJAX, i made a php file that receives the data sends it using curl to the API (as this is being done server side there is no mixed content issue) and redirects my happy user to a fancy thank you page.</p>