javascript page redirect

this one i cant add a working demo for, due to its nature, but it is working if you remove the comment.

combine this with this:

to redirect after a certain time. 



// you may need to add some time out, and wait for the page scripts to load to get this working correctly with set timeout. 

// both of these are valid page redirects
// window.location.replace("");
// window.location.href = "";

// wait 1 second (1000ms) and do a redirect
function redirect(url) {
  	console.log("if the proceeding line is uncommented it should redirect to");
	// window.location.href = "";

setTimeout(redirect(""), 1000);

Other Items in javascript

No Items Found.

Add Comment
Type in a Nick Name here
Page Views

This page has been viewed 205 times.

Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
There is no way to happiness. Happiness is the way.