javascript - How to redirect user to another internal page? -
after creating record, user redirected internal page.
"redirect home.html"
i've tried, add code under "sucess" had no success :( how redirected after register or log in?
window.location.href = "http://stackoverflow.com";
with above code works after pressing f5
<script type="text/javascript"> parse.initialize("uwkfsq1dy.......", "mgi77........"); var post = parse.object.extend("post"); $("#signup").submit(function(event){ event.preventdefault(); var username = $("#signup-username").val(); var pass = $("#signup-password").val(); var email = $("#signup-email").val(); var user = new parse.user(); user.set("username", username); user.set("password", pass); user.set("email", email); user.signup(null, { sucess: function(user){ window.location.href = "http://stackoverflow.com"; }, error: function(user, error){ console.log("signup error:"+error.message); } }); }); </script>
you start changing sucess
success
try window.location = "http://www.yoururl.com";
or window.location.href = "whatever"
or window.location.replace("http://www.yoururl.com/");
then add return it. , if doesn't still work? try using settimeout.
Comments
Post a Comment