tags:

views:

43

answers:

1

I want to change the page, I'm not sure if it is possible with JavaScript, so I tried with HTML, and it failed.

if (text=="home") {'<meta http-equiv="REFRESH" content="1;url=index.php">'; return;}

Any ideas on how to do this?

+3  A: 
document.location.href = 'YOUR_NEW_URL';
Danjah
you could add a setTimeout to delay it by a second as in the original example. `setTimeout('window.location.href="http://www.google.com"', 1000)`
Anurag
Thanks! That worked very well. (:
Anonymous the Great
Anurag > I copy and pasted that from another one of my scripts in my giant mess of folders. It doesn't actually need to be there, though. Thanks! (:
Anonymous the Great