|
Javascript and image rollovers
Hi all, im sure everyone and his cat knows how to do image rollovers, my problem is I want to dynaimcally change the name of the image I am changing, as I will be changing multiple images depending on where the users mouse is on the screen, just cant get my head around the code to make this work.. here is what i have done so far (it doesnt work).
<script=javascript>
arr_Number = ImageNumber.split("x");
document.all.xAxis.innerHTML = arr_Number[0];
document.all.yAxis.innerHTML = arr_Number[1];
ImgSourceName = "im" & arr_Number[0] & "x" & arr_Number[1]
ImgSourceName.src = "images/glassblockmouseover.jpg";
//document.write(arr_Number[0]);
//document.write(arr_Number[1]);
//alert('hello');
</script>
HTML for onew image is below.
<a href="glassinteractive.php?acc=1&down=1" onMouseOut="ImageChangerRestore()" onMouseOver="ImageChanger('1x1')"><img name="im1x1" src="images/glassblock.jpg" width="28" height="28" border="0"></a>
Hope this makes sense..
|