Jay Dog
10-11-2012, 03:05 PM
I am working on this script here:
<html><head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="GoLive CyberStudio 3">
<title>random rollover </title>
<script language="JavaScript"><!--
// javascript random rollover
// tom
roller= new Array()
roller[1]= new Image
roller[1].src ='blue tom.jpg'
roller[2]= new Image
roller[2].src ='green tom.jpg'
roller[3]= new Image
roller[3].src ='red tom.jpg'
showthis=0 //prepares the repeat-preventing variable
function TomRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {TomRandomSwapOut();}
if (showthis == oldroller[2]) {TomRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
<script language="JavaScript"><!--
// javascript random rollover
// ****
roller= new Array()
roller[1]= new Image
roller[1].src ='blue ****.jpg'
roller[2]= new Image
roller[2].src ='green ****.jpg'
roller[3]= new Image
roller[3].src ='red ****.jpg'
showthis=0 //prepares the repeat-preventing variable
function DickRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {DickRandomSwapOut();}
if (showthis == oldroller[2]) {DickRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
<script language="JavaScript"><!--
// javascript random rollover
// harry
roller= new Array()
roller[1]= new Image
roller[1].src ='blue harry.jpg'
roller[2]= new Image
roller[2].src ='green harry.jpg'
roller[3]= new Image
roller[3].src ='red harry.jpg'
showthis=0 //prepares the repeat-preventing variable
function HarryRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {HarryRandomSwapOut();}
if (showthis == oldroller[2]) {HarryRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
</head><body><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="50%" align="center" valign="middle" bgcolor="#FFFFFF">
<center>
<p><font size="5" color="#000000"><strong>Blooms Question Generator</strong></font></p>
<p> </p>
</center></td>
<td width="50%" align="center" valign="middle" bgcolor="#FFFFFF"><p> </p>
<p></p></td>
</tr>
</tbody></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%"><img src="tom **** harry.jpg" width="400" height="300" border="0" usemap="#Map"></td>
<td width="64%"><p><a href="#" onMouseOver="TomRandomSwapOut()" onMouseOut="SwapBack()"><img name="dice" src="ask me.jpg" border="0"></a> </p>
<p> </p></td>
</tr>
</table>
<p> </p>
<map name="Map">
<area shape="poly" coords="324,291,299,264,238,236,264,157,242,114,174,112,158,161,155,214,145,235,75,261,60,289" href="****" onMouseOver="DickRandomSwapOut()" onMouseOut="SwapBack()">
<area shape="poly" coords="336,292,317,270,298,255,298,209,283,186,284,174,276,141,300,115,342,99,374,124,383,153,387,181,383,220,375,242,381,251,393,254,388,289" href="harry" onMouseOver="HarryRandomSwapOut()" onMouseOut="SwapBack()">
<area shape="poly" coords="127,234,122,203,135,186,135,170,129,160,139,132,119,98,79,95,35,97,40,106,24,122,30,161,33,192,48,217,59,237,57,256,45,275,19,292,45,290,68,255" href="tom" onMouseOver="TomRandomSwapOut()" onMouseOut="SwapBack()">
</map>
</body></html>
The problem is that I want it so that when I roll over Tom, I ONLY get a random image from Toms part, similarly with **** and Harry. The problem I have is that I only get them from Harry's directory.
The URL is a specific intra-net one and I'm not sure if you can see it unless you're a member of our school.
<html><head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="GoLive CyberStudio 3">
<title>random rollover </title>
<script language="JavaScript"><!--
// javascript random rollover
// tom
roller= new Array()
roller[1]= new Image
roller[1].src ='blue tom.jpg'
roller[2]= new Image
roller[2].src ='green tom.jpg'
roller[3]= new Image
roller[3].src ='red tom.jpg'
showthis=0 //prepares the repeat-preventing variable
function TomRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {TomRandomSwapOut();}
if (showthis == oldroller[2]) {TomRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
<script language="JavaScript"><!--
// javascript random rollover
// ****
roller= new Array()
roller[1]= new Image
roller[1].src ='blue ****.jpg'
roller[2]= new Image
roller[2].src ='green ****.jpg'
roller[3]= new Image
roller[3].src ='red ****.jpg'
showthis=0 //prepares the repeat-preventing variable
function DickRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {DickRandomSwapOut();}
if (showthis == oldroller[2]) {DickRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
<script language="JavaScript"><!--
// javascript random rollover
// harry
roller= new Array()
roller[1]= new Image
roller[1].src ='blue harry.jpg'
roller[2]= new Image
roller[2].src ='green harry.jpg'
roller[3]= new Image
roller[3].src ='red harry.jpg'
showthis=0 //prepares the repeat-preventing variable
function HarryRandomSwapOut() {
//the next three lines help prevent repeating images
oldroller = new Array()
oldroller[2] = oldroller[1]
oldroller[1] = showthis
//the next line chooses the number to use in selecting the image
showthis = parseInt((Math.random()*(roller.length-1))+1);
//the next two lines help prevent repeating images
if (showthis == oldroller[1]) {HarryRandomSwapOut();}
if (showthis == oldroller[2]) {HarryRandomSwapOut();}
//the next line replaces the image with the new, random image
document.dice.src = roller[showthis].src; return true;
}
function SwapBack() {
document.dice.src = "ask me.jpg"; return true;
}
// -->
</script>
</head><body><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="50%" align="center" valign="middle" bgcolor="#FFFFFF">
<center>
<p><font size="5" color="#000000"><strong>Blooms Question Generator</strong></font></p>
<p> </p>
</center></td>
<td width="50%" align="center" valign="middle" bgcolor="#FFFFFF"><p> </p>
<p></p></td>
</tr>
</tbody></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="36%"><img src="tom **** harry.jpg" width="400" height="300" border="0" usemap="#Map"></td>
<td width="64%"><p><a href="#" onMouseOver="TomRandomSwapOut()" onMouseOut="SwapBack()"><img name="dice" src="ask me.jpg" border="0"></a> </p>
<p> </p></td>
</tr>
</table>
<p> </p>
<map name="Map">
<area shape="poly" coords="324,291,299,264,238,236,264,157,242,114,174,112,158,161,155,214,145,235,75,261,60,289" href="****" onMouseOver="DickRandomSwapOut()" onMouseOut="SwapBack()">
<area shape="poly" coords="336,292,317,270,298,255,298,209,283,186,284,174,276,141,300,115,342,99,374,124,383,153,387,181,383,220,375,242,381,251,393,254,388,289" href="harry" onMouseOver="HarryRandomSwapOut()" onMouseOut="SwapBack()">
<area shape="poly" coords="127,234,122,203,135,186,135,170,129,160,139,132,119,98,79,95,35,97,40,106,24,122,30,161,33,192,48,217,59,237,57,256,45,275,19,292,45,290,68,255" href="tom" onMouseOver="TomRandomSwapOut()" onMouseOut="SwapBack()">
</map>
</body></html>
The problem is that I want it so that when I roll over Tom, I ONLY get a random image from Toms part, similarly with **** and Harry. The problem I have is that I only get them from Harry's directory.
The URL is a specific intra-net one and I'm not sure if you can see it unless you're a member of our school.