I have another question – it has to do with my rollovers. I have the webpage set up so that when the mouse rolls over a black image, it turns orange. Now, there are four black images (they’re actually answers to questions). The black images (a.jpg, b.jpg, c.jpg, and d.jpg) are the original images. Now, when the user rolls over, it switches to aon.jpg, bon.jpg, conn.jpg, and don.jpg. After the mouse leaves, it turns black again. I have the webpage set up so that if one of the four rollovers is clicked, a confirm window will popup, with OK and Cancel. If the user clicks OK, the page will run on (I have it delay for 6 seconds, then go to the new page).
My question is, how can I get it so that after the user clicks “OK” in the confirm window, the rollover image will change to aon.jpg, or bon.jpg, etc, while the page is going through its 6 second delay? (This means the image will go orange). Is there a code that I insert in the confirm window, or the rollover? Would it be onclick = ?
I have a weird setup, and the code for the confirm window is actually near the top of the page, not on each rollover. It’s a pretty complicated setup. I’ll post the codes, and hopefully somebody can help me out. Thanks! ?
<HTML>
<HEAD>
<TITLE>Who Wants To Be A Millionaire
</TITLE>
<SCRIPT TYPE=”text/javascript”>
<!–
// copyright 1999 Idocs, Inc. [url]http://www.idocs.com/tags/
// Distribute this script freely, but please keep this
// notice with the code.
var rollOverArr=new Array();
function setrollover(OverImgSrc,pageImageName)
{
if (! document.images)return;
if (pageImageName == null)
pageImageName = document.images[document.images.length-1].name;
rollOverArr[pageImageName]=new Object;
rollOverArr[pageImageName].overImg = new Image;
rollOverArr[pageImageName].overImg.src=OverImgSrc;
}
function rollover(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
if (! rollOverArr[pageImageName].outImg)
{
rollOverArr[pageImageName].outImg = new Image;
rollOverArr[pageImageName].outImg.src = document.images[pageImageName].src;
}
document.images[pageImageName].src=rollOverArr[pageImageName].overImg.src;
}
function rollout(pageImageName)
{
if (! document.images)return;
if (! rollOverArr[pageImageName])return;
document.images[pageImageName].src=rollOverArr[pageImageName].outImg.src;
}
//–>
</SCRIPT>
<script>
history.forward()
</script>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
var hint = 0;
function Hint () {
if (hint >= 0) {
alert(“This is not a short word, but it’s not necessarily a long word, either.”)
}
}
// End –>
</SCRIPT>
[COLOR=Red]<Script Language=JavaScript>
var delayCount = 0;
function delayExit(){
if (delayCount < 6 )
{
delayCount++;
setTimeout(“delayExit()”,1150);
}
else {window.location.replace(‘Allinfo/50000wr.html’)}
}
function playClip(){
document.getElementById(‘bgWav’).src = “Allinfo/50final.mp3”;
delayExit();
}
function exitPlay(){
if (confirm(‘Is that your final answer?’))
{
playClip();
}
}
</Script><Script Language=JavaScript>
var delayCount = 0;
function delayExit2(){
if (delayCount < 6 )
{
delayCount++;
setTimeout(“delayExit2()”,1150);
}
else {window.location.replace(‘Allinfo/50000r.html’)}
}
function playClip2(){
document.getElementById(‘bgWav’).src = “Allinfo/50final.mp3”;
delayExit2();
}
function exitPlay2(){
if (confirm(‘Is that your final answer?’))
{
playClip2();
}
}
</Script>
<BgSound id=’bgWav’ Loop=1 Volume=”+500″ Src=”Allinfo/50000.mp3″>
<BODY bgcolor = “black” alink = “black” vlink = “black” link = “black” onload=”alert(‘ATTENTION – PLEASE READ!nn Upon clicking Final Answer in the following round, the page will appearn to do nothing for eight seconds. This is not a malfunction.’)”>
<CENTER>
<TABLE align = “left”>
<TR>
<TD><CENTER><IMG SRC = “Allinfo/Millionaire.jpg”></CENTER></TD>
</TR>
</TABLE>
</CENTER>
<TABLE align = “right”>
<TR>
<TD><CENTER>
<BR>
<FORM>
<INPUT
TYPE=”button” ONCLICK=”Hint()” VALUE=”Free Hint”></FORM>
</CENTER>
</TD>
</TR>
<TR>
<TD><IMG SRC = “Allinfo/50000Total.jpg”>
</TD>
</TR>
</TABLE>
<BR>
<P>
<BR>
<P>
<BR>
<P>
<BR>
<P>
<BR>
<P>
<BR>
<P>
<BR>
<P>
<BR>
<BR><TABLE align = “left”>
<TR>
<TD colspan = “2”>
<IMG SRC = “Allinfo/50000money.jpg”>
</TD>
</TR>
<TR>
<TD colspan = “2”>
<IMG SRC = “50000info/Question50000.jpg”>
</TD>
</TR>
<TR>
<TD>
[COLOR=Red]<A
onMouseOver = “rollover(‘A’); window.status=’A’;return true”
onMouseOut = “rollout(‘A’)”><IMG
SRC=”50000info/A.jpg” onclick=”exitPlay()”
NAME=”A”
ALT=”A”></A>
<SCRIPT TYPE=”text/javascript”>
<!–
setrollover(‘50000info/Aon.jpg’);
//–>
</SCRIPT>
</TD>
<TD>
<A
onMouseOver = “rollover(‘B’); window.status=’B’;return true”
onMouseOut = “rollout(‘B’)”
><IMG
SRC=”50000info/B.jpg” onclick=”exitPlay()”
NAME=”B”
ALT=”B”
></A>
<SCRIPT TYPE=”text/javascript”>
<!–
setrollover(‘50000info/Bon.jpg’);
//–>
</SCRIPT>
</TD>
</TR>
<TR>
<TD>
<A
onMouseOver = “rollover(‘C’); window.status=’C’;return true”
onMouseOut = “rollout(‘C’)”
><IMG
SRC=”50000info/C.jpg” onclick=”exitPlay()”
NAME=”C”
ALT=”C”
></A>
<SCRIPT TYPE=”text/javascript”>
<!–
setrollover(‘50000info/Conn.jpg’);
//–>
</SCRIPT>
</TD>
<TD>
<A
onMouseOver = “rollover(‘D’); window.status=’D’;return true”
onMouseOut = “rollout(‘D’)”
><IMG
SRC=”50000info/D.jpg” onclick=”exitPlay2()”
NAME=”D”
ALT=”D”
></A>
<SCRIPT TYPE=”text/javascript”>
<!–
setrollover(‘50000info/Don.jpg’);
//–>
</SCRIPT>[/COLOR]</TD>
</TR>
<TR>
<TD colspan = 2>
<A
HREF=”Allinfo/50000walk.html” onCLick=”return confirm(‘Are you sure you want to walk?’)”
onMouseOver = “rollover(‘Walk’); window.status=’Walk’;return true”
onMouseOut = “rollout(‘Walk’)”
><IMG
SRC=”Allinfo/Run.jpg”
NAME=”Walk”
ALT=”Walk”
></A>
<SCRIPT TYPE=”text/javascript”>
<!–
setrollover(‘Allinfo/Runon.bmp’);
//–>
</SCRIPT>
</TD>
</TR>
</TABLE>