a little problem here...

admin

Administrator
Staff member
okay, heres my code:


function change(imgName, image1, image2) {
details.src = image2;
imgName.src = image1;
}
function changeBack(imgName, image1) {
details.src = 'Images/placeholder.gif';
imgName.src = image1;
}


as you may be able to assume, i am trying to work with the onMouseOut, and onMouseOver events. The call looks similar to this:


<a href=http://www.webdeveloper.com/forum/archive/index.php/"resume.htm" onMouseOut="changeBack('Resume', 'Images/1-1.gif')"
onMouseOver="change('Resume','Images/1-2.gif','Images/resume.gif')"><img
src=http://www.webdeveloper.com/forum/archive/index.php/"Images/1-1.gif" alt="Resum?quot; name="Resume"
width="70" height="200" border="0"></a>


so i am supplying the functions with the image names of the files to be replaced, and the names of the current images.
The problem is that only one works, the one that has a definite name (description.src). The images with the changing names, does not work however.

I assume that its in this line: imgName.src = image1; but i am at a loss as for what else to do

I hope that my description of this problem is not too vague.

Regards,
Ryan
 
Back
Top