Hi! I am making my bands website, n i though this template would make my vision easy to do..but it hasn't worked out how i'd of liked it to.
www.penitentiary.co.uk
I have already put the other half of the script in, but it is this part which is wrong. It is script so that every time the home page is visited, 1 of 6 images appears at random adding variety...however, 4 of the images link to different areas of the site (this is possible?) I guess it's cause i've used HTML coding in it, but i know nothing of java.
Below is the script..if you could help me based on what I offer you, or even correct it for me, i'd be so appriciative..as i'm pulling my hair out over this.
~Blade376
<script language="JavaScript" type="text/javascript">
// This script was supplied free by Hypergurl
//
http://www.**************
<!--
// JavaScript to interpolate random images into a page.
var ic = 6; // Number of alternative images
var xoxo = new Array(ic); // Array to hold filenames
xoxo[0] = "http://www.penitentiary.co.uk/Home%20Page%20Adverts/13th%20March%20Gig%20Edit.jpg";
xoxo[1] = "http://www.penitentiary.co.uk/Home%20Page%20Adverts/EPADlarge.jpg";
xoxo[2] = <p align="center"><a href="http://www.penitentiary.co.uk/EPcoverdesigns.htm"><img src="http://www.penitentiary.co.uk/Home%20Page%20Adverts/epcoverdesignAD.jpg"></a>;
xoxo[3] = <p align="center"><a href="http://www.penitentiary.co.uk/Flyers.htm"><img src="http://www.penitentiary.co.uk/Home%20Page%20Adverts/FlyersADlarge.jpg"></a>;
xoxo[4] = <p align="center"><a href="http://www.penitentiary.co.uk/forum/index.php"><img src="http://www.penitentiary.co.uk/Home%20Page%20Adverts/ForumADlarge.jpg"></a>;
xoxo[5] = <p align="center"><a href="http://www.penitentiary.co.uk/news.htm"><img src="http://www.penitentiary.co.uk/Home%20Page%20Adverts/MailinglistADlarge.jpg"></a>;
function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
// Write out an IMG tag, using a randomly-chosen image name.
var choice = pickRandom(ic);
// -->
</script>