Hello All,
I have been muddling through with this script - however, I'm at an impasse with it - I'm trying to add an onclick to the images displayed, or in the array
what this does is display an image in the array using a drop menu.... what I need to add is the ability to click on the displayed image and go to either a new page (_blank) or (_self)
Is this doable??
regards............
I have been muddling through with this script - however, I'm at an impasse with it - I'm trying to add an onclick to the images displayed, or in the array
Code:
<table width="620" height="121" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="121"><SCRIPT LANGUAGE="JavaScript">
var Image_array = new Array();
//new Array("Image location",width,height,"description image")
Image_array[0] = new Array("eco_img/bags/mens/2559.jpg",600,285," BG2559 - Tiger");
Image_array[1] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[2] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[3] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[4] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[5] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[6] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
Image_array[7] = new Array("eco_img/bags/mens/2558.jpg",600,285," BG2558 - Black Rhino");
//If you want to add more images use Image_array[etc]= ...
function setf(thisv)
{
img_changer.src = Image_array[thisv][0];
img_changer.style.width = Image_array[thisv][1];
img_changer.style.height = Image_array[thisv][2];
}
</script>
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
<td width="12%"><select onChange="setf(this.selectedIndex)">
<script language=javascript>
for(i=0;i<Image_array.length;i++)
{
document.write("<option>" + Image_array[i][3]);
}
</script>
</select></td>
<td width="38%"></td>
</tr>
</table>
<br>
<br>
<img name=img_changer border=0>
</center>
<script language=javascript>setf(0);</script>
</td>
</tr>
</table>
what this does is display an image in the array using a drop menu.... what I need to add is the ability to click on the displayed image and go to either a new page (_blank) or (_self)
Is this doable??
regards............