Click to See Complete Forum and Search --> : target="_top"???


dmarinic
01-14-2003, 11:34 PM
How do you specify a target frame for the redirect page?

I've tried following, but it doesn't seem to be working:
<meta http-equiv="refresh" content="5;url=http://mysite; target=_top">

I'm trying to redirect my users from "Thank you" page displayed within a frame to the "welcome" :D page supposebly displayed in it's own frameset?

Any input highly appreciated.
Thanks

Nicodemas
01-15-2003, 01:11 AM
Hmm.. don't know anyway to open a new window, or specify a target when it comes to meta refresh.

You could use Javascript? Something like this should work:

<SCRIPT LANGUAGE="javascript">
<!--
function goWelcome(){
parent.location = "http://www.to_the_welcome_page.com"
}
function timer(){
setTimeout("goWelcome()",7000)
}
window.onLoad = timer
//-->
</SCRIPT>

dmarinic
01-15-2003, 05:53 PM
Thanks guys for your help.
However, I was just currios about target frame when <META HTTP-EQUIV="Refresh" ...> is used, as I already had a JavaScript solution.
And yes, Dave, it's better to use top.location.href="url", as in my case "the frame is nested more then one level deep".

Thanks to both.
Cheers,
Dali

Zach Elfers
01-15-2003, 06:14 PM
Dave, wouldn't top.location.href break a page out of frames? Should someone use top.parent.frameName.location.href instead?

jeffmott
01-15-2003, 06:52 PM
dmarinic
However, I was just currios about target frame when <META HTTP-EQUIV="Refresh" ...> is used
Just to expand a little bit more on this; the reason there is no way to set the target for a meta refresh is because it was never meant as a way to forward users to different pages (and using it in this way is discouraged as this makes the page inaccessible to some users). It's meant simply to refresh the page it appears in.

dmarinic
01-15-2003, 06:59 PM
the reason there is no way to set the target for a meta refresh is because it was never meant as a way to forward users to different pages (and using it in this way is discouraged as this makes the page inaccessible to some users). It's meant simply to refresh the page it appears in.

Acknowledged...;)

Thanks a lot to all.
Dali