Need redirection (break out of frame) script!!

General software, Operating Systems, and Programming discussion.
Everything from software questions, OSes, simple HTML to scripting languages, Perl, PHP, Python, MySQL, VB, C++ etc.
Post Reply
User avatar
catngo
Regular Member
Posts: 213
Joined: Mon Dec 11, 2000 12:00 am
Location: Oklahoma City

Need redirection (break out of frame) script!!

Post by catngo »

okay, to break out of frame, just use:
<a target=_top href=.........>


to redirect: this is my code

<script>
<!--

//change below target URL to your own
var targetURL="http://www.vinaclub.net"
//change the second to start counting down from
var countdownfrom=10


var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}

countredirect()
//-->
</script>

and this is the working model: here

now, the PROBLEM

i want it to redirect but also break out of frame. anyone know how to combine this 2 together?
User avatar
TonyT
SG VIP
Posts: 10356
Joined: Fri Jan 28, 2000 12:00 am
Location: Fairfax, VA

Post by TonyT »

var targetURL="http://68.66.9.31:8080"
No one has any right to force data on you
and command you to believe it or else.
If it is not true for you, it isn't true.

LRH
User avatar
catngo
Regular Member
Posts: 213
Joined: Mon Dec 11, 2000 12:00 am
Location: Oklahoma City

Post by catngo »

okay, 68.66.9.31:8080 resolve to vinaclub.net so they're both the same. but still, it will not break out of frame.
User avatar
ub3r_n00b
Posts: 2086
Joined: Sun Feb 16, 2003 6:31 pm
Location: Rivendel, East of The Ford of Bruinen

Post by ub3r_n00b »

use
<meta http-equiv="refresh" content="2;url=http://whatever.com">

in the index.html...

-Preet
User avatar
catngo
Regular Member
Posts: 213
Joined: Mon Dec 11, 2000 12:00 am
Location: Oklahoma City

Post by catngo »

thx, that is the basic redirection script. but still not break out of frame. okay, i need something that would execute the <a target=_top href="http://www.vinaclub.net">here</a> automatically.
Post Reply