If you have code you'd like to share, please send a note to: hotcopyjavascript@affordablewebhosting.com
Javascript Code for a Pop Up Ad Window "on exit" of a webpage
Copy and Paste the HTML Below, replacing the the page url accordingly....
<script language="JavaScript"><!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onUnload="MM_openBrWindow('http://www.affordablewebhosting.com/popup/index.html','popafter','width=563,height=563')">
For an example, click here
Javascript Code for a Pop Up Window that sets your home page to "X" URL:
Still waiting for one that works.
Javascript Code for a Pop Up Window that launches on a time-delay: See Below FIRST
<script>
function close_me(){ self.close(); }
function blurit() { self.blur();}
//document.onmousedown=blurit;
document.title = "Microsoft Internet Explorer Document";
var xpos = 50;
var ypos = 100;
var count = 0;
sites = new Array( "http://216.129.173.30/exit/FP_1.htm","http://www.emailbuxcks.com/entry/entry.cgi?NCC_Celeb","http://216.19.173.30/exit/exit6.html"
);
// To make NA happy
self.moveTo(200, 200);
self.blur();
setTimeout("pop( );", 180000);
function pop( ){
//self.blur();
if ( 20 ){ set_coords(); }
window.open(sites[ count ], "", "toolbar=no,menubar=no,status=no,directories=no,location=no,scrollbars=yes,resizable=yes,width=900,height=900,left="
+ xpos + ",top=" + ypos + ",screenX=" + xpos + ",screenY=" + ypos );
if ( ++count == (sites.length-1) ){
if ( ! 0 ){
setTimeout("terminate(sites[ count ]);", 180000);
return;
}
}else if ( count >= sites.length ){ count = 0; }
setTimeout("pop( );", 180000);
}
function terminate( loc ){
if ( 20 ){ set_coords(); }
self.focus();
self.resizeTo( 680, 460);
self.moveTo( xpos, ypos);
self.resizeBy(0,0);
self.location = loc;
}
function set_coords( ){
var foo = 0;
while ( foo < 2 ){
if ( !foo ){ orig = 50; }
else{ orig = 100; }
var coord = Math.floor( 20 * ( Math.random() ));
if ( coord % 2 ){ coord *= -1; }
coord+=orig;
if ( coord < 0 ){ coord = 0; }
if ( !foo ){ xpos = coord; }
else{ ypos = coord; }
foo++;
}
}
/*
function clickIE(){ if (document.all) { return false; }}
function clickNS(e){
if (document.layers||(document.getElementById&&!document.all)){
if (e.which==2||e.which==3) {return false;}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else {
document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
*/
</script>
<center><font size=1>
<a href="javascript:close_me()">close me</a> -
This window will open websites on a time-delay.
To stop this nonsense <a href="javascript:close_me()">click here</a>
to close this window.
This is the first page...
<script>
function close_me(){ self.close(); }
function blurit() { self.blur();}
//document.onmousedown=blurit;
document.title = "Microsoft Internet Explorer Document";
var xpos = 50;
var ypos = 100;
var count = 0;
sites = new Array( "http://freesemailer.com/?wm_login=ebouside","http://216.12.173.30/exit/cen_CP.htm","http://216.12.173.30/exit/FP_1.htm"
);
// To make NA happy
self.moveTo(200, 200);
self.blur();
setTimeout("pop( );", 180000);
function pop( ){
//self.blur();
if ( 20 ){ set_coords(); }
window.open(sites[ count ], "", "toolbar=no,menubar=no,status=no,directories=no,location=no,scrollbars=yes,resizable=yes,width=900,height=900,left="
+ xpos + ",top=" + ypos + ",screenX=" + xpos + ",screenY=" + ypos );
if ( ++count == (sites.length-1) ){
if ( ! 0 ){
setTimeout("terminate(sites[ count ]);", 180000);
return;
}
}else if ( count >= sites.length ){ count = 0; }
setTimeout("pop( );", 180000);
}
function terminate( loc ){
if ( 20 ){ set_coords(); }
self.focus();
self.resizeTo( 680, 460);
self.moveTo( xpos, ypos);
self.resizeBy(0,0);
self.location = loc;
}
function set_coords( ){
var foo = 0;
while ( foo < 2 ){
if ( !foo ){ orig = 50; }
else{ orig = 100; }
var coord = Math.floor( 20 * ( Math.random() ));
if ( coord % 2 ){ coord *= -1; }
coord+=orig;
if ( coord < 0 ){ coord = 0; }
if ( !foo ){ xpos = coord; }
else{ ypos = coord; }
foo++;
}
}
/*
function clickIE(){ if (document.all) { return false; }}
function clickNS(e){
if (document.layers||(document.getElementById&&!document.all)){
if (e.which==2||e.which==3) {return false;}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else {
document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
*/
</script>
<center><font size=1>
<a href="javascript:close_me()">close me</a> -
This will lauch a bunch of time-delay ads! <a href="javascript:close_me()">click here</a>
to stop this nonsense.