php - Javascript for HTTPS -
i've been going through google, bing, etc etc trying find out how can scripts run correctly, google chrome says it's attempting load scripts unauthenticated sources, , i'm not 100% sure means that.
here's login page runs fine on localhost, chrome doesn't running script.
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script> $(function () { $('#login').on('submit', function (e) { e.preventdefault(); $.ajax({ type: 'post', url: 'calls.php', data: $('#login').serialize(), success: function (data, response) { if(data==1) { window.location.href = "/account.php"; return false;} else{ $( ".result" ).html( data );} } }); }); }); </script> <div style="background-image:url('img/doxramos.png'); background-size:100% 100%; width:455px; height:188px;margin-left:auto; margin-right:auto;"></div> <form method="post" class="login" id="login" action="calls.php"> <input type="hidden" name="process" id="process" value="login"> <label for="login">email:</label> <input type="text" name="username" id="username" placeholder="name@example.com"> </p> <p> <label for="password">password:</label> <input type="password" name="password" id="password" placeholder="password"> </p> <p class="login-submit"> <button type="submit" class="login-button" id="submit">login</button> </p> <p class="forgot-password"><a href="index.html">forgot password?</a></p> </form> <div class = "result" style="text-align:center; margin-left:auto; margin-right:auto;"></div>
it means you're running current file/page ssl, you're getting resources non-https url's.
just change url
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
Comments
Post a Comment