Automatic Redirect with Javascript

Im in d middle of a project which require auto redirect after submitting a form so i thought i just gonna share it how it works. setTimeout(‘window.location = “http://luckyphq.com”‘, 5000); The code above will redirect the page to “http://luckyphq.com” after 5 seconds. It’s simple.

Get Paramater with Javascript

Normaly we get parameter in php is with $_GET[“”], but get paramter with javascript its a different case. Hopefully this will help : <script> var search = window.location.search.substring(1); var complete_param = search.split(“&”); for(var i=0;i<complete_param.length;i++) { var single_param = complete_param[i].split(“=”); if (single_param[0] == variable) { return single_param[1]; } } </script> **variable = is the parameter that …