php - Cross Origin request - what am I missinG -


i have page being served on https, "example.com/page.php"

in page jquery ajax call:

$.ajax({     url : "http://example.com/print/printreceipt.php",     datatype:"jsonp",     success:function(data)     {         alert("success!");     } }); 

the "print" directory has .htaccess file includes:

header set access-control-allow-methods "post, get, put, options, patch, delete"  header set access-control-allow-origin * 

the jquery returns error:

mixed content: page @ '...' loaded on https, requested insecure script '...?callback=jquery300107312130929496792_1478818377085&_=1478818377088'. request has been blocked; content must served on https.

what missing?

try put request type ajax call type:'get'


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -