javascript - google+ login error. Blocked a frame with origin "http://localhost" -


i applying google+ login in website. when send data service save on database gives me following error:

uncaught securityerror: blocked frame origin "http://localhost" accessing frame origin "https://apis.google.com". frame requesting access has protocol of "http", frame being accessed has protocol of "https". protocols must match.

my code is: function fills values in textboxes. , values getting filled correctly.

function signincallback(authresult) { if (authresult['status']['signed_in']) {     gapi.client.load('plus', 'v1', function() {         var request = gapi.client.plus.people.get({             'userid': 'me'         });         request.execute(function(resp) {             var googleid = resp.id;             var name=resp.displayname             isgooglesignup(googleid, function(res) {                 if (res) {                     window.location = "profile.php";                 } else {                      $("#loginpopup").css("dispaly", "none");                     $("#signuppopup").css("display", "block");                     $("#socialname").val(name);                     //$("#socialmail").val();                     $("#socialid").val(googleid);                     $("#socialtype").val("google");                   }                });            console.log(resp);             });       }); } else {     console.log('sign-in state: ' + authresult['error']); } } 

this function gives error when called submit button click-

function socialsignup1() { var urlstring = "service/socialsignup.php"; var form = new object(); form.socialid = $("#socialid").val; console.log(form.socialid); form.type = $("#type").val(); form.name = $("#socialname").val(); form.mail = $("#socialmail").val(); form.phone = $("#socialphone").val(); form.address = $("#socialaddress").val(); $.ajax({     type: 'post',     data: form,     url: urlstring,     success: function(resultdata) {         if (resultdata == 1) {             window.location("profile.php");          }     },     error: function(resultdata) {         alert(resultdata);     },     failed: function() {         alert("hello");     }   });  } 

as error message says:

the frame requesting access has protocol of "http", frame being accessed has protocol of "https". protocols must match.

so, change protocol you're using.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -