 | 
04-08-2009, 06:39 AM
| | Member | | Join Date: Jan 2009
Posts: 54
| | make a window "pop under" when it is opened Put this as early in the <head> of the page as possible: <script>
self.blur();
</script>
That tells the window to "lose focus" as soon as it reads the self.blur(); -- which makes the window "jump behind" the window that is currently in focus. |  Sponsored Ads | | Member | | Join Date: LongTime Posts: 1100 | | New Sponsored Ads This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today! | 
06-24-2009, 11:35 AM
| | Senior Member | | Join Date: Jun 2009
Posts: 203
| | make a window "pop under" when it is opened Hello all someone can remake this script that opened new windows other site. When a visitor open my website +automatically opens another website in new window one time per IP address? Sorry for the English spelling.
I have script
Insert the following code into the head section of your html document: Quote:
<SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
<!--
var win=null;
function NewWindow(mypage,myname,w,h,pos,infocus){
if(GetCookie("sid") == "999"){return;}
document.cookie="sid=999; Path=/; Expires= " + getFuture(999);
if(pos=="random"){myleft=(screen.width)?Math.floor (Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.rand om()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.wi dth-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status= no,menubar=no,toolbar=no,resizable=no";win=window. open(mypage,myname,settings);
win.blur();}
// Cookie functions borrowed from:
// Ronnie Moore: Visit him at http://www.ronniemoore.com
function getFuture(f){
var d = new Date();
d.setTime(d.getTime() + (86400000 * f));
return d;
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
// -->
</script>
| code to the <BODY> tag of your document. Quote: |
<body onLoad="NewWindow('http://www.google.com','acepopup','640','480','fullscreen ','back');"return false " onFocus= "this.blur();">
| |  Sponsored Ads | | Member | | Join Date: LongTime Posts: 1100 | | New Sponsored Ads This message will go away once you are registered. Also, by registering, you will have access to all post topics, communicate privately with other members (PM), respond to polls, upload graphics, and access other special features! Registration is fast, simple and absolutely free so please Click Here to join our Web Hosting community today! | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT. The time now is 04:29 PM. |  | |