PDA

View Full Version : get rid of frames when linked to your website



laksh
October 16th, 2005, 11:20 AM
hi! is there any such code that can get rid of frames from your website

for example, if you have a free .tk domain name, all links on the site will open up with a .tk advertisement frame on top (suppose i have a .tk name, my website will have a .tk frame on top, and when surfers click a Kirupa.com link, www.kirupa.com will open up with a frame on top with a .tk advertisement)

how can i get rid of this .tk frame that appears on my website? any code? javascript maybe ...

it should be possible because when i click on a NY Times link from my .tk website, frame dont appear ..

thanx in advance ...

lostinbeta
October 16th, 2005, 11:43 AM
Well you can't do it on clickable links because it's something that has to be in the document that gets loaded... which usually looks something like

<script type="text/javascript">
<!--
function break(){
if(top.location.href != document.location.href)
{
top.location.href = document.location.href;
}
}
-->
</script>

<body onload="javascript:break();">

Or something like that... written off the top of my head and I haven't javascripted in quite some time.

The only way to really break out a of frame in a link would be to target _top in your HTML <a href> tag.... which would overwrite your page because it would load it in the same window.

So it would seem NY Times doesn't do this because they have the proper code in their page.

DaveMania
October 16th, 2005, 11:47 AM
that's much better than my plan

laksh
October 16th, 2005, 05:10 PM
when i still go to the site, it gives me this code, not the code code of my index.html.....any thoughts, the code lostinbeta gave didnt work .... thanx alot though ...



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Laksh's Website</title>
<META HTTP-EQUIV="expires" CONTENT="0">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta name="description" content="Lakshs Personal Website!">
<meta name="keywords" content="About Laksh, Laksh, Lakshs Homeapge">
<script type="text/javascript" language="JavaScript"><!--

function determineLocation()
{
MyPopup = window.open("/1129497097315.ban?fldpromonr=1&fldbannernr=0&flddomainnr=7233657&ip=65.96.219.61&tid=1129497097315","1129497097315","height=100,width=486");

if (MyPopup == null) {
forward_url = '/adstart?fldpromonr=4&fldbannernr=0&flddomainnr=7233657&ip=65.96.219.61&tid=1129497097315&fwurl=http://laksh.home.comcast.net&fallback=yes';
register_url = '/black.html';

} else {
forward_url = 'http://laksh.home.comcast.net';
register_url = '/register.html';
}
dot_tk_frame_content.location = forward_url;
dot_tk_frame_register.location = register_url;
}
// --></script>
</head>

<script type="text/javascript" language="JavaScript">
<!--
document.write('<frameset rows="35px,*" onload="Javascript:determineLocation()" framespacing="0" border="0" frameborder="NO">');
document.write('<frame src="" name="dot_tk_frame_register" scrolling="no" noresize>');
document.write('<frame src="" name="dot_tk_frame_content" scrolling="auto" noresize>');
document.write('</frameset>');
// -->
</script>
<noscript>
<frameset rows="*,1" framespacing="0" border="0" frameborder="NO">

<frameset rows="35px,*" framespacing="0" border="0" frameborder="NO">');
<frame src="/black.html" name="dot_tk_frame_register" scrolling="no" noresize>');
<frame src="/adstart?fldpromonr=4&fldbannernr=0&flddomainnr=7233657&ip=65.96.219.61&tid=1129497097315&fwurl=http://laksh.home.comcast.net&fallback=yes" name="dot_tk_frame_content" scrolling="auto" noresize>
</frameset>
</noscript>
</html>