GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   i need a java script (https://gfy.com/showthread.php?t=56733)

roseyrid 04-13-2002 02:29 AM

i need a java script
 
anyone know where I can get a java script for exit popup.

If someone closes my page, a new page opens, but if they continue through it wont popup.

thanks,
rosey

Gemini 04-13-2002 03:20 AM

A 'blur' might be better than a new open... tics off the surfer less from our experience. :)

ServerGenius 04-13-2002 03:40 AM

Hi there,

This sets a cookie so it will only pop-up once per session
it's loads the window on exit and is blurred.

PHP Code:


<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.random()*((screen.height-h)-75)):100;}
if(
pos=="center"){myleft=(screen.width)?(screen.width-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=" ",height=" ",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();}

function 
getFuture(f){
var 
= 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 
0;
while (
clen) {
  var 
alen;
  if (
document.cookie.substring(ij) == arg)
  return 
getCookieVal (j);
  
document.cookie.indexOf(" "i) + 1;
  if (
== 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(offsetendstr));
}
// -->
< /script>


<
body onUnload="NewWindow('http://www.domain.com','byewindow','640','480','custom','back');"return false " onFocus= "this.blur();"> 

DynaMite


All times are GMT -7. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123