Hi all, I have a popup window that works great, and is resistant to popup killers, I only wish there was some way to load more than one link in it so that it could open a random ad instead of the same one over and over, also would be great if it would only load once per browser session. I really don't want to annoy my visitors. Does anyone know how to modify this script so that it can load random ads instaed of the same one over and over? For now I have made 2 copies of my index page and named them something else and put different popups in them and then added those pages to a random page script and it works good, but I still wish that it could just load random ads from a pool of links. I tried using the random page link as the popup with links to my popups in it but it did'nt work, it popped up 2 windows instead of one when I did that. I had to leave the script tags out of the script below because for some reason it would'nt show up here when I left them in.
<head>
//Modeless window script- By DynamicDrive.com
//for full source code and terms of use
//visit http://www.dynamicdrive.com
function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"http://www.casinocorral.com/popups/lottos","help:0;resizable:1;dialogWidth:'+mwidth+' px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"","width='+mwidth+'px,heigh t='+mheight+'px,resizable=1,scrollbars=1")')
}
//configure URL and window dimensions (width/height)
modelesswin("http://www.casinocorral.com/popups/lottos",500,500)
//To load via link, use something like below:
//Click here
</head>
Here is the random page script
<!-- ONE STEP TO INSTALL RANDOM PAGE:
1. Copy the coding into the HEAD of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
var howMany = 2; // max number of items listed below
var page = new Array(howMany+1);
page[0]="http://www.casinocorral.com/";
page[1]="http://www.casinocorral.com/index.htm";
page[2]="http://www.casinocorral.com/main";
function rndnumber(){
var randscript = -1;
while (randscript < 0 || randscript > howMany || isNaN(randscript)){
randscript = parseInt(Math.random()*(howMany+1));
}
return randscript;
}
quo = rndnumber();
quox = page[quo];
window.location=(quox);
// End -->
</SCRIPT>
</HEAD>
<center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided
by The JavaScript Source</font>
</center>
<!-- Script Size: 0.89 KB -->
------------------------------------------------------------------------------------
Thank You For Your Help.
Have A Nice Day.
Casinofever