PDA

View Full Version : Auto-redirect


Leperous
24-09-2000, 10:57
How'd you make a page auto-redirect to another one, BUT doing so in a different frame (e.g. I want it to open another page in _top frame)

So far I got-
<'META HTTP-EQUIV="REFRESH" CONTENT="2; URL=http://WEBURL"> (ignore ' and WEBURL bit)
But how do I put in the target frame bit?

Shaun
24-09-2000, 12:42
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=http://www.yoursite.com/" target="_self"">

i THINK
not certain on it
but replace the _self bit with _top or _blank or where ever u want to redirect to

Greap
26-09-2000, 10:22
.

[Edited by Greap on 26-09-2000 at 10:25 AM]

Greap
26-09-2000, 17:33
shove either of these bits of javascript in the head of your main frame(not frameset) document.

Asuming the frame name is topframe with no time delay between switching pages. Replace newpage.htm wiith the file name of your page.


<script language=javascript>
<!--

parent.frames.topframe.location.href = "newpage.htm"

// -->
</script>


or with a timer same as before frame names etc. replace the 2000 bit with how many seconds you want before the page changes (multiply the number of seconds by 1000)


<script language=javascript>
<!--

myTimer=setTimeout("parent.frames.topframe.location.href='newpage.htm'",2000)

// -->
</script>


Me thinks i have got everything right there but i aint tested it.
if ya need any more help im on ICQ #62707368