Click to See Complete Forum and Search --> : Help please


Jick
03-27-2003, 03:39 AM
My sever puts the following code at the top of every one of my pages above the top html tag and it brings up a popup window on every page that pops over your window after like 5 seconds and the host said the popups are not forced so if you can figure out how to remove them then you can. Could someone post a counter code that I could put on every one of my pages to disable this popup and also tell me where to put it on my pages. Thankz. :D
----------------------------------------------------------------------
<script language="JavaScript">win155 = window.open('','cons723'); win155.blur();self.focus();var url = "http://" + self.location.host;var file = "/locmntl/hotfreebies.html";if (win155.document.URL.indexOf(url) == -1) { win155.location.href = url + file; }</script>
----------------------------------------------------------------------
Any help is welcomed thankz.

tim_gor
03-27-2003, 04:16 AM
Maybe you could insert some script after their script like:
<script>
win155.close();
</script>

But then I have a suspicion that win155 might be a random name so it probably won't work very well...

If that's the case, then you'll want to figure out a pattern of how the server generates the variable name --
e.g. if you find out that it picks a number from 1 to 1000 and sticks a win in front of it
winXXX = ....

then you can just make some code to go through every possibility and closing every single window by that name

e.g.
<script>
for(var i=1; i<1001; i++){
var argument = "win" + i + ".close()";
eval(argument);
}
</script>

DaveSW
03-27-2003, 06:43 AM
What happens if you modify their code? i.e. put window.close at the end, or something. Or change the url? Or delete the script...

Alternately, if the script shouldn't be there, send them an e-mail to let them know how displeased you are, how you are considering taking your business elsewhere... You know... the usual irate customer stuff.

dave

pyro
03-27-2003, 07:49 AM
IF you are absolutly positive that it is not required by your host to include that code, you could make a function called window.open() and have it return false. This will, however, disallow you to open popups, as well. But, I'm guessing that it is a requirement by your server, and should be left alone...

Jick
03-27-2003, 10:17 AM
Thsi script is added to the top of every page by the server not by me so when i upload my files it does not have that script so the server inserts it in all of my pages kinda like how gGeocities does it. So does that change things for any of your ansers?

pyro
03-27-2003, 10:22 AM
I'm still guessing that somewhere when signing up, you agreed to leave that code there...