Click to See Complete Forum and Search --> : Removing Host inserted Javascript Frames
DJsAC
09-21-2003, 08:42 AM
I have a website which is hosted on http://www.tripod.lycos.nl but am getting tired of the commercials which it adds.
It automatically adds the following code to the Very top of every htm/html page.
<script language="javascript">
if(window == window.top) {
var address=window.location;
var s='<html><head><title>'+'</title></head>'+
'<frameset cols="*,140" frameborder="0" border="0" framespacing="0" onload="return true;" onunload="return true;">'+
'<frame src="'+address+'?" name="memberPage" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+
'<frame src="http://ads.tripod.lycos.nl/ad/google/frame.php?_url='+escape(address)+'" name="LycosAdFrame" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+
'</frameset>'+
'</html>';
document.write(s);
}
</script>
I want to know if anyone here knows how to disable this frameset without removing all other framesets.
I know that you can resize the frame using:
<script language="JavaScript"><!--
parent.document.body.cols='100%,0%'
//--></script> But that resizes all frames, including the ones that I created.
AdamBrill
09-21-2003, 09:22 AM
There would be a way to do that, but why don't you just find a different host?? There are hundreds of free hosts out there, so there's no point to using one that puts ads on the top of every page... I would suggest that you find a free host that doesn't have ads...
DJsAC
09-21-2003, 09:28 AM
I chose for Lycos because is has free php, and MySQL support.
As i currently have numerous sites on the lycos servers I prefer adding a script to the pages instead of moving my numerous websites.
If anyone has a solution?
thank you!
AdamBrill
09-21-2003, 09:57 AM
Well, it's hard for me to tell(since the site wasn't in English), but try adding a frame buster and see if that works... I'm not sure if it will, but it is hard for me to help since I can't read the site, lol. ;)
Nevermore
09-21-2003, 01:57 PM
You should be able to just resize their frame to 0 and yours to *.
DJsAC
09-21-2003, 02:23 PM
the insert done by lycos is added randomly, so if the frameset is not created, my entire site "crashes"
is there a way to check to see if there is a frameset with cols *,140 and if so delete THAT frameset?
The page looks like this:
___________________________________________
|..........................................|
|....................A.....................|
|__________________________________________|
|................|.........................|
|........B.......|............C............|
|................|.........................|
|................|.........................|
|................|.........................|
|................|.........................|
|................|.........................|
|________________|_________________________|
the extra frame is usually added to frame C which is already in a frameset, (called 'mainFrame)
check http://members.lycos.nl/djsac/Homepage.php?Language=1 for an example of My frameset.
I want to remove the frames in c.html but still want c.html to appear in its official frame.
The code for c.html =
<script language="javascript">
if(window == window.top) {
var address=window.location;
var s='<html><head><title>'+'</title></head>'+
'<frameset cols="*,140" frameborder="0" border="0" framespacing="0" onload="return true;" onunload="return true;">'+
'<frame src="'+address+'?" name="memberPage" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+
'<frame src="http://ads.tripod.lycos.nl/ad/google/frame.php?_url='+escape(address)+'" name="LycosAdFrame" marginwidth="0" marginheight="0" scrolling="auto" noresize>'+
'</frameset>'+
'</html>';
document.write(s);
}
</script>
*****************************************
Above code is inserted randomly on html pages. I want that removed or hidden or disabled.
*****************************************
My code, works but crashes site when above frameset is not loaded
<script language="JavaScript"><!--
parent.document.body.cols='100%,0%'
//--></script>
*****************************************
Original site
<html>
<head>
<title>TITLE TEXT</title>
</head>
<body>
TEST TEXT
</body>
</html>
*****************************************
Used to remove other scripts (is ok as-is.)
<noscript>
<noscript>
<plaintext>
<plaintext>
I want a code that tests to see if the host inserted a frame. If this is true then disable that ONE frameset (leaving the rest intact) and if this is false it should load the page normally.
Thanks for your help!
Greetz
DJ's A.C.
EDIT: this should have been put at the bottom of the other topic with the same name, sorry.
I merged them together for you...
DJsAC
09-21-2003, 04:01 PM
thanks pyro!:o :)
Vladdy
09-21-2003, 04:22 PM
Removing host code goes against the terms of use you agreed to when signing up with them. I'm surprised the thread has not been closed yet since it clearly promoted illegal behaviour.
DJsAC
09-22-2003, 12:24 AM
as for my actions being illegal, the actions lycos is undertaking are even more so.
I did indeed sign up for a free account with one (1) advertisement on the entire website (2 years ago)
since then the advertisments have changed to a frame which was ok.
then it changed again and this is the irritating part, It can now (randomly) load the advertisements on every single page. This is starting to get crazy see for yourself: http://members.lycos.nl/acmusicserver/reclame.jpg
I dont want to remove everything, just the ones that obscure the viewing area.
can someone please help?
greetz
Dj's A.C.
see whether it helps or not:
if (window.name=="memberPage") {
parent.document.body.cols="100%,0%";
}
DJsAC
09-22-2003, 12:58 PM
thank you Xin,
let me try it.
thanks!
:D
DJsAC
09-22-2003, 04:06 PM
Thank you,
Thank you,
Thank you,
Thank you,!!!!
I can't say it enough. It works! :D;)
You have saved me from alot of stress :confused: and problems.
Thanx!
Greetz
DJ's A.C.