Click to See Complete Forum and Search --> : meta not redirecting


Squire
09-10-2003, 11:31 AM
page1:
<meta http-equiv="refresh" content="1; url=
file://C:\mydocu~1\page2.htm" />

page2:
<meta http-equiv="refresh" content="10; url=
page1.htm" />

This works fine, however...

page1:
document.write('<html><head><meta http-equiv="refresh"
content="1; url=file://C:\\mydocu~1\\page2.htm" /></head>
<body>Redirecting...</body></html>');

This works the first time round, but after that, it just displays the text without redirecting me. If I click refresh it loads page2/1 and stops again :confused:
The only other thing my browser seems to do at this point, is change my cursor to background processing when I move it over certain parts (of ie6)... for what ever that means!

requestcode
09-10-2003, 11:39 AM
If you are trying to run it from your hard drive then I don't believe it will work. Try uploading it to your website and then test it.

Squire
09-10-2003, 02:37 PM
Aww screw it!! This is pretty much what page1 actually looks like:

<html><head>
<script>
function move(param) {
if(param==1) document.write('<html><head>
<meta http-equiv="refresh" content="1; url=file://
C:\\mydocu~1\\blah.htm" /></head>
<body>Redirecting to blah...</body></html>');

if(param==2) document.write('<html><head>
<meta http-equiv="refresh" content="1; url=file://
C:\\mydocu~1\\page2.htm" /></head>
<body>Redirecting to page2...</body></html>');
}
</script>

</head><body bgcolor="#0080ff" text="#00f000">
<font size="4" face="Arial">
blah<br/>
<br/>
</font>
<font = size="3" face="Arial">
blah<br/>
<br/>
</font>
<img src="for test purposes, bad link"
onLoad="move(1)" onError="move(2)">
</body></html>

Here, the image fails, then doc.write creates a new page which redirects to page2. page2 redirects to page1 again. Then page1 creates the new page (again), but fails to redirect.

requestcode, I ended up uploading the following (and setting the page2 url to it), and you were right, it worked.

<html><head><script>document.write('<html><head>
<meta http-equiv="refresh" content="1; url=file://C:\\
mydocu~1\\page2.htm" /></head><body>Redirecting to page2...
</body></html>');</script></head><body>Writing page...
</body></html>
Except, when I saved this locally (and set page2 url to it), it still worked! Inface, instead of behaiving like the original (top) doc.write (whereby it create a new page), it just displayed "Redirecting to page2...Writing page..." then redirected everytime.

So..yeah...umm... In conclusion. What's the top page doing wrong, as for it to not behave like the bottem page, which it should.