0

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?

2
  • 2
    if you feel one answered your question, don't forget to accept it by clicking the check mark below... Commented Jun 10, 2010 at 4:52
  • Yes, I had to wait about 18 minutes or whatever it was, in that time I forgot to come back and accept it. Do I always have to wait for these flood checks? Commented Jun 10, 2010 at 23:56

1 Answer 1

3
document.location.href = 'YOUR_NEW_URL';
Sign up to request clarification or add additional context in comments.

2 Comments

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 > 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! (:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.