View Full Version : Java script to rotate random exit windows from a pool
Sellyourhits
06-24-2002, 05:01 PM
Can ayone give me a good java script to rotate say 10 random
urls from a pool on exit?
1 at a time.
cheers
eskimoen
06-24-2002, 05:28 PM
<script language="JavaScript">
function popit(){
urls = new Array("http://www.blabla.com","http://www.blabalbalabla.com");
num = parseInt((Math.random() * urls.length));
window.open(urls[num]);
}
</script>
Sellyourhits
06-24-2002, 05:59 PM
Thanks E
Appreciate it.
Sellyourhits
06-24-2002, 06:08 PM
E I can't get it to work,
http://www.freenetpresence.com/testindex.htm
I listed the 5 urls I'd like to popup in random, but it don't work.
I'd appreciate you looking at it.
Cheers
Steve
Sabertooth
06-24-2002, 06:11 PM
Did you put the "onunload" shit to body tag ?
Sabertooth
06-24-2002, 06:15 PM
no you didn't:
<BODY text=#ffffff vLink=#ff0000 aLink=#ffffff link=#ffffff bgColor=#000000
onunload=exitcon()>
should be:
<BODY text=#ffffff vLink=#ff0000 aLink=#ffffff link=#ffffff bgColor=#000000
onunload=popit()>
Sellyourhits
06-24-2002, 06:24 PM
Saber
Thanks man, it works now, never was much of a java guy.
Appreciate the help
Steve
Sellyourhits
06-24-2002, 10:31 PM
Saber
is there a code to put on urls to prevent the popups opening when a link is clicked ?
Like onclick="shut=false"
Thanks
porntowers.com
06-24-2002, 10:36 PM
Yes, here is an example link, that is if your script's function is to execute onunload...
<a href="some_bs.com" onclick='javascript:exit=false'> What ever text </a>
Sellyourhits
06-24-2002, 10:44 PM
Originally posted by porntowers.com
Yes, here is an example link, that is if your script's function is to execute onunload...
<a href="some_bs.com" onclick='javascript:exit=false'> What ever text </a>
I added onclick='javascript:exit=false'
but I still get the popup on clicking the links.
http://www.freenetpresence.com/testindex.htm
Your input is much appreciated
porntowers.com
06-24-2002, 11:08 PM
Hold up I'm checking out your source.
porntowers.com
06-24-2002, 11:23 PM
<html>
<head>
<title>WARNING PAGE - ENTERING AN ADULT SEXUALLY EXPLICIT SITE, PLEASE READ BEFORE
CLICKING ENTER</title>
<script language="javascript">self.moveTo(0,0);self.resizeTo(screen.availWidth,s creen.availHeight);</script>
<script language="JavaScript">
function popit(){
urls = new Array("http://www.pussyhaul.com","http://www.freenetpresence.com/adult.htm","http://www.freenetpresence.com/adult2.htm","http://www.freenetpresence.com/adult3.htm","http://www.freenetpresence.com/casino.htm","http://www.sellyourhits.com","http://www.freenetpresence.com/1.htm","http://www.freenetpresence.com/2.htm","http://www.freenetpresence.com/3.htm","http://www.freenetpresence.com/4.htm");
num = parseInt((Math.random() * urls.length));
window.open(urls[num]);
}
</script>
</head>
<body bgcolor="#000000" text="#FFFFFF" link="#FFFFFF" vlink="#FF0000" alink="#FFFFFF"
onunload="popit()">
<p align="center"> </p>
<div align="center"><center>
<table border="0" cellpadding="0" width="100%">
<tr>
<td width="100%" align="center"><a href="http://204.177.92.193/party/affPP/index02.jhtml?pin=502931" onclick="javascrip:popit=false"><font face="Arial" size="5"><strong>ASIAN FORBIDDEN SEX!</strong></font></a></td>
</tr>
<tr>
<td width="100%" align="center"></a><a
href="http://204.177.92.193/party/affPP/index03.jhtml?pin=502931"
onclick="javascrip:popit=false"><font face="Arial" size="5"><strong>LESBIAN LICKING
LOVERS!</strong></font></td>
</tr>
<tr>
<td width="100%" align="center"></a><font face="Arial" size="5"><strong><a
href="http://204.177.92.193/party/affPP/index04.jhtml?pin=502931"
onclick="javascrip:popit=false">HARDCORE SEX ACTION!</a></strong></font></td>
</tr>
<tr>
<td width="100%" align="center"><font face="Arial" size="5"><strong><a
href="http://204.177.92.193/party/affPP/index02.jhtml?pin=502931"
onclick="javascrip:popit=false">GREAT MEGA ORGIES!</a> </strong></font></td>
</tr>
<tr>
<td width="100%" align="center"><font face="Arial" size="5"><strong><a
href="http://204.177.92.193/party/affPP/indexgy.jhtml?pin=502931"
onclick="javascrip:popit=false">HOT GAY STUDS HAVING SEX!</a></strong></font></td>
</tr>
</table>
</center></div>
<p align="center"><br>
<font face="Arial" size="2"><strong> <a href="http://www.sellyourhits.com"
onclick="javascrip:popit=false">WEBMASTERS MAKE BIG MONEY</a></strong></font></p>
<p align="center"> </p>
</body>
<!--webbot bot="HTMLMarkup" startspan TAG="XBOT" --></script>
</html>
Problem solved. Just set whatever the name of the function you're calling to 'false'. That way the function returns nothing...
porntowers.com
06-24-2002, 11:24 PM
Also you had more than one body tag and head and html... this can cause some browsers to have inconsistent reactions as the code is inconsistent.
porntowers.com
06-24-2002, 11:29 PM
<!--webbot bot="HTMLMarkup" startspan TAG="XBOT" --></script>
Get rid of this type of stuff as this is what I mean. There is a closing script tag with no paired starting script tag... Be wary of this type of thing as some browsers are less forgiving than others.
Sellyourhits
06-24-2002, 11:33 PM
It works, the page is renamed to
http://www.freenetpresence.com/outindex.htm
Cheers
Steve
vBulletin® v3.7.3, Copyright ©2000-2012, Jelsoft Enterprises Ltd.