-1

I set up a page redirect using javascript, and the "Form" method from the following website:

https://webworkshop.net/auto-redirecting_methods

I set this up a few weeks ago, and it worked fine then. However, when I looked at it the other day it was no longer working.

Can anyone shed any light on this?

Thanks

Mark

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
  • Please provide the could You are currently having the issue with. – Zubair1 Jun 05 '16 at 10:01
  • Sorry, here's the code I used: – Pixelrat Jun 11 '16 at 11:50
  • Duplicate: http://stackoverflow.com/questions/14028959/why-does-jquery-or-a-dom-method-such-as-getelementbyid-not-find-the-element – Quentin Jun 11 '16 at 21:50

1 Answers1

0

It looks like you're simply wanting to redirect:

You can do it with JavaScript and HTML Meta tags

<!doctype>
<html>

<head>
  <meta http-equiv="refresh" content="0; url=http://www.yourdomain.com/new-page.html">
</head>

<body>
  Auto refresh in 0 seconds
</body>

</html>

The other method is by using JavaScript, like below:

<!doctype>
<html>

<head>
  <script>
    window.location = 'http://www.yourdomain.com/new-page.html';
    </script>
</head>

<body>
  This would also redirect as soon as the page loads.
</body>

</html>

Hope that helps

Zubair1
  • 2,770
  • 3
  • 31
  • 39