I'm having an issue where I'm trying to set a page's redirect destination to a URL from a JS function.
I've tried calling the function by using <meta http-equiv="refresh"
in the header, but I either have the syntax wrong or <meta>
simply doesn't allow for calling functions. I'm honestly not sure.
<head>
<script src="extFile.js"></script>
<meta http-equiv="refresh" content="1; go2();" id="levP" name="levP">
<title>SO Question</title>
</head>
go2()
is a function from extFile.js
which contains an if/then statement that provides different URLs depending on time of day. I'd like to have index.html
redirect users via function go2()
either by a method in the header or in the body.
If this should be handled in the body then I'd appreciate any feedback as to how that should look.