Hi,
I am a newbie to javascript and have some code for a slideshow that works fine, the only thing is that the images in the ary array are not clickable. Here is the code :
[CODE]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title></title>
</head>
<body>
<script type=”text/javascript”>
<!–
var ary=[
‘batman_arkham_asylum.jpg’,
‘borderlands.jpg’,
‘brink.jpg’,
‘mini_ninjas.jpg’,
‘prince_of_persia.jpg’,
‘spiderman_shattered_dimensions.jpg’
];
function Slide(id,ary,nu){
document.getElementById(id).src=ary[nu];
Slide[id]={nu:nu}; // create a function Slide[id] object with a property of nu recording the current image number
}
function nextImage(id,ary,ud){
var nu=(Slide[id]&&Slide[id].nu?Slide[id].nu:0)+ud; // if the function Slide[id] object exists use that or use 0 and add ud
Slide(id,ary,Math.min(Math.max(nu,0),ary.length-1));
}
//–>
</script>
<img src=”previous.png” name=”previous” height=”46″ width=”46″ onmouseup=”nextImage(‘slideshow’,ary,-1);” id=”previous”/>
<img src=”next.png” name=”next” height=”46″ width=”46″ onmouseup=”nextImage(‘slideshow’,ary,1)” id=”next”/>
<img src=”batman_arkham_asylum.jpg” name=”slide” id=”slideshow”/>
</body>
</html>
how would I make the jpegs clickable, I have tried using hrefs but it didn’t work, any help would be greatly appreciated, thanks.