javascript - Can I redirect my innerHTML text back to my home page after an interval of, say 10 secs? -



javascript - Can I redirect my innerHTML text back to my home page after an interval of, say 10 secs? -

when sign new account, , successful, part of code runs , changes form display message "check email[...]". i'm trying create message display few seconds, redirect home page.

_("signupbutton").style.display = "none"; status.innerhtml = 'please wait ...'; var ajax = ajaxobj("post", "signup.php"); ajax.onreadystatechange = function() { if(ajaxreturn(ajax) == true) { if(ajax.responsetext != "signup_success"){ status.innerhtml = ajax.responsetext; _("signupbutton").style.display = "block"; }else { window.scrollto(0,0); _("wrap").innerhtml = "<div >check email inbox finish sign process activating account.</div>";

as mentioned in comment, need utilize settimeout , location

_("signupbutton").style.display = "none"; status.innerhtml = 'please wait ...'; var ajax = ajaxobj("post", "signup.php"); ajax.onreadystatechange = function() { if(ajaxreturn(ajax) == true) { if(ajax.responsetext != "signup_success"){ status.innerhtml = ajax.responsetext; _("signupbutton").style.display = "block"; }else { window.scrollto(0,0); _("wrap").innerhtml = "<div >check email inbox finish sign process activating account.</div>"; settimeout(function() { window.location = 'homepage.html'; // or whatever url }, 10000);

javascript html

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -