I am an absolute beginner with javascript
and have no idea how to solve this one.
got a function fu() which should display the NAME of the image upon onmouseover,but when I try it,all the images show the same name,although they have different names in the code.

I thought the problem might be in the getElementById argument,that is why i've put 3 question marks instead of an ID...



<SCRIPT language="JavaScript">
function fu(){
    var m = document.getElementById("???").getAttribute("NAME");

<IMG id="something" NAME="pic1" SRC="1.jpg" height="50" width="50" 
onmouseover="fu()" >

<IMG id="somethingelse" NAME="pic2" SRC="2.jpg" height="50" width="50" 

change the function like fu(this)

function fu(obj)
var m = document.getElementById(obj.id).getAttribute("NAME");

They will show the same name because you can only hard code one element id, what u can do is this:


then in the javascript function change it to this:

function fu(el){

by sending in the this property u are sending the element object to teh function and thus will be able to retrieve any attribute of that element.