hvorfor virker dette ikke?
Jeg vil have to banners ved siden af hinanden! Jeg har prøvet dette script som burde virke! 30 Points til den som finder fejlen!<HTML>
<script language=\"JavaScript\">
<!-- Hide from old browsers
// Copyright © 1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com
var i = 1;
bannera1= new Image();
bannera1.src = \"http://www.7step.com/updatemadeeasy/banners/250_60_udme.gif\";
bannera2 = new Image();
bannera2.src = \"http://www.7step.com/updatemadeeasy/banners/udme_webdesign_250_60.gif\";
var k = 1;
bannerb1= new Image();
bannerb1.src = \"http://www.7step.com/updatemadeeasy/banners/250_60_udme.gif\";
bannerb2 = new Image();
bannerb2.src = \"http://www.7step.com/updatemadeeasy/banners/udme_webdesign_250_60.gif\";
linksa = new Array
linksa[1] = \"http://www.7step.com\"
linksa[2] = \"http://www.grabit.dk/2000/startsiden.htm\"
linksb = new Array
linksb[1] = \"http://www.7step.com\"
linksb[2] = \"http://www.grabit.dk/2000/startsiden.htm\"
descriptiona = new Array
descriptiona[1] = \"YOUR DESCRIPTION #1\"
descriptiona[2] = \"YOUR DESCRIPTION #2\"
descriptionb = new Array
descriptionb[1] = \"YOUR DESCRIPTION #3\"
descriptionb[2] = \"YOUR DESCRIPTION #4\"
function startTime1(){
var timea= new Date();
hoursa= timea.getHours();
minsa= timea.getMinutes();
secsa= timea.getSeconds();
closeTimea=hoursa*3600+minsa*60+secsa;
closeTimea+=5; // How many seconds til the next rotation
Timer1();
}
function startTime2(){
var timeb= new Date();
hoursb= timeb.getHours();
minsb= timeb.getMinutes();
secsb= timeb.getSeconds();
closeTimeb=hoursb*3600+minsb*60+secsb;
closeTimeb+=5; // How many seconds til the next rotation
Timer2();
}
function Timer1(){
var timea= new Date();
hoursa= timea.getHours();
minsa= timea.getMinutes();
secsa= timea.getSeconds();
curTimea=hoursa*3600+minsa*60+secsa
if (curTimea>=closeTime){
if (i < 2){ // The number 2 is the amount of banners that you have
i++;
document.bannera.src = eval(\"bannera\" + i + \".src\");
}
else{
i = 1;
document.bannera.src = eval(\"bannera\" + i + \".src\");
}
startTime1();
}
else{
window.setTimeout(\"Timer()\",1000)}
}
function Timer2(){
var timeb= new Date();
hoursb= timeb.getHours();
minsb= timeb.getMinutes();
secsb= timeb.getSeconds();
curTimeb=hoursb*3600+minsb*60+secsb
if (curTimeb>=closeTime){
if (k < 2){ // The number 2 is the amount of banners that you have
k++;
document.bannerb.src = eval(\"bannerb\" + k + \".src\");
}
else{
k = 1;
document.bannerb.src = eval(\"bannerb\" + k + \".src\");
}
startTime2();
}
else{
window.setTimeout(\"Timer()\",1000)}
}
function clickLinka(){
top.location = linksa[i]
}
function clickLinkb(){
top.location = linksb[i]
}
function descripta(){
window.status = descriptiona[i]
}
function descriptb(){
window.status = descriptionb[i]
}
// -->
</script>
<body onLoad=\"startTime1(); startTime2();\">
<a href=\"\" onClick=\"clickLinka(); return false;\" onMouseOver=\"descripta(); return true;\" onMouseOut=\"window.status=\'\'\"><img src=\"http://www.7step.com/updatemadeeasy/banners/250_60_udme.gif\" border=0 name=\"bannera\"></a>
<a href=\"\" onClick=\"clickLinkb(); return false;\" onMouseOver=\"descriptb(); return true;\" onMouseOut=\"window.status=\'\'\"><img src=\"http://www.7step.com/updatemadeeasy/banners/udme_webdesign_250_60.gif\" border=0 name=\"bannerb\"></a>
</BODY>
</HTML>
