JeStEr
07-29-2002, 06:34 AM
The following javascript only works in Netscape. It doesn't work in Internet Explorer 6, it keeps giving me errors. Is there anything i can do that would fix the javascript and make in compatible with all netscape and internet explorer browsers?
<HTML>
<HEAD>
<TITLE>Untitled</TITLE>
<SCRIPT LANGUAGE=JavaScript>
<!--
timer=""
whereto=new Array()
whereto[whereto.length]="http://www.yahoo.com"
whereto[whereto.length]="http://www.google.com"
whereto[whereto.length]="http://www.huntingground.net"
whereto[whereto.length]="http://www.microsoft.com"
whereto[whereto.length]="http://www.freeserve.co.uk"
whereto[whereto.length]="http://www.yahoo.com"
function playSound(name,where){
clearTimeout(timer)
document.embeds[name].play();
here=where
timer=setTimeout("document.location=whereto[here]",1000)
}
// -->
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript>
<!--
timer=""
whereto1=new Array()
whereto1[whereto.length]="http://www.yahoo.com"
function playSound1(name,where){
clearTimeout(timer)
document.embeds[name].play();
here=where
timer=setTimeout("document.location=whereto1[here]",6000)
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<EMBED SRC="sounds/sound1.wav" autostart=false HIDDEN=TRUE NAME="music1" MASTERSOUND width="128" height="128">
<EMBED SRC="sounds/sound2.wav" autostart=false HIDDEN=TRUE NAME="music2" MASTERSOUND width="128" height="128">
<a href="#null" onclick="playSound('music1','0');return false" ><IMG SRC="pictures/pic1.jpg"></a>
<a href="#null" onclick="playSound('music1','1');return false" ><IMG SRC="pictures/pic2.jpg"></a>
<a href="#null" onclick="playSound('music1','2');return false" ><IMG SRC="pictures/pic3.jpg"></a>
<a href="#null" onclick="playSound('music1','3');return false" ><IMG SRC="pictures/pic4.jpg"></a>
<a href="#null" onclick="playSound('music1','4');return false" ><IMG SRC="pictures/pic5.jpg"></a>
<a href="#null" onclick="playSound('music1','5');return false" ><IMG SRC="pictures/pic6.jpg"></a>
<a href="#null" onclick="playSound1('music2','6');return false" ><IMG SRC="pictures/pic7.jpg"></a>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Untitled</TITLE>
<SCRIPT LANGUAGE=JavaScript>
<!--
timer=""
whereto=new Array()
whereto[whereto.length]="http://www.yahoo.com"
whereto[whereto.length]="http://www.google.com"
whereto[whereto.length]="http://www.huntingground.net"
whereto[whereto.length]="http://www.microsoft.com"
whereto[whereto.length]="http://www.freeserve.co.uk"
whereto[whereto.length]="http://www.yahoo.com"
function playSound(name,where){
clearTimeout(timer)
document.embeds[name].play();
here=where
timer=setTimeout("document.location=whereto[here]",1000)
}
// -->
</SCRIPT>
<SCRIPT LANGUAGE=JavaScript>
<!--
timer=""
whereto1=new Array()
whereto1[whereto.length]="http://www.yahoo.com"
function playSound1(name,where){
clearTimeout(timer)
document.embeds[name].play();
here=where
timer=setTimeout("document.location=whereto1[here]",6000)
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<EMBED SRC="sounds/sound1.wav" autostart=false HIDDEN=TRUE NAME="music1" MASTERSOUND width="128" height="128">
<EMBED SRC="sounds/sound2.wav" autostart=false HIDDEN=TRUE NAME="music2" MASTERSOUND width="128" height="128">
<a href="#null" onclick="playSound('music1','0');return false" ><IMG SRC="pictures/pic1.jpg"></a>
<a href="#null" onclick="playSound('music1','1');return false" ><IMG SRC="pictures/pic2.jpg"></a>
<a href="#null" onclick="playSound('music1','2');return false" ><IMG SRC="pictures/pic3.jpg"></a>
<a href="#null" onclick="playSound('music1','3');return false" ><IMG SRC="pictures/pic4.jpg"></a>
<a href="#null" onclick="playSound('music1','4');return false" ><IMG SRC="pictures/pic5.jpg"></a>
<a href="#null" onclick="playSound('music1','5');return false" ><IMG SRC="pictures/pic6.jpg"></a>
<a href="#null" onclick="playSound1('music2','6');return false" ><IMG SRC="pictures/pic7.jpg"></a>
</BODY>
</HTML>