I would like to display area tag name after a person clicks on it. Unfortunately when I use code below for map area I get undefined name of obiekt name. It's weird because for textbox 'kot' it works well.
<script>
function metoda(obiekt)
{
alert(obiekt.name); //Here I get undefined!
}
</script>
<input type='text' value='kot' name='das' onclick='metoda(this);'></input>
<map name='mapkama'>
<area
name='AE'
shape='POLY'
coords='285,87,287,90,288,87,285,87'
href='#'
title=''
onclick='metoda(this); return false;'>
</map>
<img usemap="#mapkama" src='http://myimage.com/image'>
How to display area name from metoda function?