Jquery ajax call failed and returns an error on iframes framework

I am trying to add a form to a Facebook page through the application "Static HTML: iframe tabs". I use jQuery, ajax, php to submit a form and get success or error. When I run the form outside of Facebook iFrames, everything works fine. But on iFrames, I ran into two problems:

  • AJAX call is interrupted every time. It returns an error value and does not pass values.
  • Google chrome gives me "this page has insecure content"

here is my ajax call:

$.ajax({ type: "POST", url: "send.php", contentType: "application/x-www-form-urlencoded; charset=utf-8;", data: data_string, dataType: 'html', success: function(data){ alert('success'); }, error: function() { alert('error'); } }); 

Thanks in advance.

+1
source share
1 answer

solved. In fact, the problem was that the demand for secure connections in iFrames required Facebook. All that had to be done was to store the file on a web host using SSL. Then make sure that all links on the html pages have "https".

This resolved both of the above problems.

+2
source

All Articles