Originally posted by thePurpleGiant:
The target code will tell the browser which frame to load the content in. Hope that helps
I tried that and it doesn't work. It may be because the banner rotation is javascript... When I put a target in, the banners no longer rotate and clicking on them does nothing. Very weird.
Here is the code:
i = 9 // Number of banners that you have
banner1 = new Image();
banner1.src = "images/bb1.jpg";
banner2 = new Image();
banner2.src = "images/dh2.jpg";
banner3 = new Image();
banner3.src = "images/ub3.jpg";
banner4 = new Image();
banner4.src = "images/bb3.jpg";
banner5 = new Image();
banner5.src = "images/dh3.jpg";
banner6 = new Image();
banner6.src = "images/ub4.jpg";
banner7 = new Image();
banner7.src = "images/dh1.jpg";
banner8 = new Image();
banner8.src = "images/ub2.jpg";
banner9 = new Image();
banner9.src = "images/bb2.jpg";
links = new Array
links[1] = "../content/films/baby/index.html"
links[2] = "../content/films/delhi/index.html"
links[3] = "../content/films/truth/index.html"
links[4] = "../content/films/baby/index.html"
links[5] = "../content/films/delhi/index.html"
links[6] = "../content/films/truth/index.html"
links[7] = "../content/films/delhi/index.html"
links[8] = "../content/films/truth/index.html"
links[9] = "../content/films/baby/index.html"
description = new Array
description[1] = "Baby Eat Baby"
description[2] = "Delhi House"
description[3] = "Baby Eat Baby"
description[4] = "Baby Eat Baby"
description[5] = "Delhi House"
description[6] = "The Unbelievable Truth"
description[7] = "Delhi House"
description[8] = "The Unbelievable Truth"
description[9] = "Baby Eat Baby"
function randombanner(){
var randomnumber = Math.random();
i = Math.round( (i - 1) * randomnumber) + 1;
document.banner.src = eval("banner" + i + ".src");
}
function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=7;
Timer();
}
function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (i < 9){
i++;
document.banner.src = eval("banner" + i + ".src");
}
else{
i = 1;
document.banner.src = eval("banner" + i + ".src");
}
startTime();
}
else{
window.setTimeout("Timer()",1000)}
}
function clickLink(){
top.location = links[i]
}
function descript(){
window.status = description[i]
}