Saturday, 7 September 2013

What needs to be changed in this code to make the page on top of it that loads this in a iframe change load a new url?

What needs to be changed in this code to make the page on top of it that
loads this in a iframe change load a new url?

ok so heres my code
<html>
<head>
<title></title>
<body>
<script>
<!--
/*
Cookie Redirect. Written by PerlScriptsJavaScripts.com
Copyright http://www.perlscriptsjavascripts.com
Free and commercial Perl and JavaScripts
*/
// page to go to if cookie exists
go_to = "http://www.cookieisthere.com";
// number of days cookie lives for
num_days = 365;
function ged(noDays){
var today = new Date();
var expr = new Date(today.getTime() + noDays*24*60*60*1000);
return expr.toGMTString();
}
function readCookie(cookieName){
var start = document.cookie.indexOf(cookieName);
if (start == -1){
} else {
window.location = go_to;
}
}
readCookie("seenit");
// -->
</script>
</body>
</html>
This page will load on a page through a iframe... if the cookie is their i
want the parent window to go to http://www.cookieisthere.com not the
original page. After reading up on it a bit some people say use _top where
the link is but i dont know how to do this. All help is much appreciated
:)

No comments:

Post a Comment