<script type="text/javascript">
function moveover()
{
document.getElementById('image').width="1080";
document.getElementById('image').height="600";
}
function moveback()
{
document.getElementById('image').width="180";
document.getElementById('image').height="100";
}
</script>
</head>
<body>
<img id=image src=images/PCF10.jpg
onmouseover="moveover()"
onmouseout="moveback()"
width="180" height="100" />
<br />
<br>
<body>
<img id=image src=images/PCF94.jpg
onmouseover="moveover()"
onmouseout="moveback()"
width="180" height="100" />
<br />
</body>
</html>
I have a page with multiple small images posted that I want to rollover to bring up an enlarged version of the same image, I am using distinct code for each picture right now and it works just fine except for the fact that it requires 17 lines of code for each rollover. I would like to do something like I have laid out here but the variable stays locked on the first image file and only the small image of the second is displayed. If I roll over the second smallimage the first large image is didplayed.
I have looked all over the web and can't find something the will fit my circumstances. I am a relative newcomer to java so any help would definetly be appreciated. I have approximately 100 images I want use this with so 17 lines of code per seems complete overkill!
You can check ou my site at http://swiftboats.com and go to PCF 10 to see how my code works.
Thanks,