Så har jeg fundet synderen !!!!
Description:
Now you to can own the code that is used to power those annoying web sites that seems to open popup windows from nowhere! Actually the primary reason we are giving this code away is that other companies are charging for such an easy piece of code. It is rather involved so pay close attention.
The primary idea behind this script is to open a window off screen that opens a series of popup windows based a preset amount of time. This is all triggered using page open or page close codes. Many sites trigger this after people leave their site. Since there is a preset timer to open the first window it is not always know what site actually opened the window.
Directions:
Follow Steps 1 - 3 below. Use the 'Grab Text' buttons to select the code within the adjacent textarea. Then use Control-C or Edit -> Copy to buffer the text for pasting into your document.
Steps 1 and 2 are used to open the hidden popup window. Add the code from step one and 2 into the page of your site used to start the process, we call it the primary window (your index.htm page, for example).
Step 1: This code opens the hidden window that launches the popups. This code is placed between the and tags.
<SCRIPT LANGUAGE="JAVASCRIPT" >
// ***********************************************
// AUTHOR:
www.CGISCRIPT.NET, LLC
// URL:
http://www.cgiscript.net// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// (
http://www.cgiscript.net/scripts.htm )
// ***********************************************
function openSpawner(url,name) {
window.open('hidden_popup.htm','popper','width=10,height=10,top=5000,left=5000,scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no');
}
</SCRIPT>
Step 2: Add the following code to the tag of the primary window. You can choose whether the spawner opens up when the user enters the page (onLoad) or when the user exits the page (onUnload).
( ex. "openSpawner();self.blur()"> )
onUnload (when user EXITS the page):
onUnload="openSpawner();self.blur()"
onLoad (when user ENTERS the page):
onLoad="openSpawner();self.blur()"
Steps 3 is used to create the hidden popup page that controls all the action.
Step 3: Paste this entire code into a blank page and name it hidden_popup.htm. I could take time to explain the contents of the code below but the areas you need to edit are defined within. You will add the url's, specify the names of the popups, specify the height and width of the popups, specify the position the popup appears in, then you will specify the amount of delay between each of the popups. Insert the following code between the and tags in the hidden_popup.htm.
<script language=javascript>
// ***********************************************
// AUTHOR:
www.CGISCRIPT.NET, LLC
// URL:
http://www.cgiscript.net// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// (
http://www.cgiscript.net/scripts.htm )
// ***********************************************
//### array setup - leave this alone
var pURL = new Array();
var pName = new Array();
var pPos = new Array();
var pDelay = new Array();
var pHeight = new Array();
var pWidth = new Array();
//### configure your popups here ###
//### URLs of the Popup Windows ###
//### you can add as many as you want ###
//### start with [0] and increment up by one ([1], [2], etc...) ###
pURL[0] = "
http://www.address1.com";pURL[1] = "
http://www.address2.com";pURL[2] = "
http://www.address3.com";pURL[3] = "
http://www.address4.com";//### Name of the Popup Windows. If you choose the same name, it will load in the same window ###
//### If you add URLs above you must add corresponding name below ###
pName[0] = "pop1";
pName[1] = "pop2";
pName[2] = "pop3";
pName[3] = "pop4";
//### Height of popup ###
//### If you add URLs above you must add corresponding height below ###
pHeight[0] = "200";
pHeight[1] = "500";
pHeight[2] = "800";
pHeight[3] = "300";
//### Width of popup ####
//### If you add URLs above you must add corresponding width below ###
pWidth[0] = "600";
pWidth[1] = "500";
pWidth[2] = "700";
pWidth[3] = "300";
//###position of popup. Options: center, random, base (0,0) ###
//### If you add URLs above you must add corresponding position below ###
pPos[0] = "center"
pPos[1] = "random"
pPos[2] = "random"
pPos[3] = "base"
//### seconds that will lapse before window pops up ###
//### If you add URLs above you must add corresponding delay below ###
pDelay[0] = "5";
pDelay[1] = "10";
pDelay[2] = "15";
pDelay[3] = "20";
//<--- don't edit any code below --->//
var win=null;
function OpenWindow(url,id,w,h,scroll,pos,t,l){
if(pos=="random"){
Left=Math.floor(Math.random()*(screen.width-w));
Top=Math.floor(Math.random()*((screen.height-h)-75));
}
if(pos=="center"){
Left=(screen.width-w)/2;
Top=(screen.height-h)/2;
}
if(pos=="base"){
Left=0;
Top=0;
}
if(pos=="absolute"){
Left=t;
Top=l;
}
set='width='+w+',height='+h+',top='+Top+',left='+Left+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
mywin=window.open(url,id,set);
mywin.focus();
}
for(var npop in pURL){
var st= "OpenWindow('"+pURL[npop]+"','"+pName[npop]+"',"+pWidth[npop]+","+pHeight[npop]+",'yes','"+pPos[npop]+"',0,0)";
setTimeout(st,pDelay[npop]*1000);
}
</script>
Der kan læses mere om det på dette link:
http://www.cgiscript.net/cgi-script/csNews/csNews.cgi?database=js_windows%2edb&command=viewone&id=46&op=t