ok right I have this script that creates an icon image and adds assigns a function to an event on this image. You can create as many icons as you want. Now my problem is that I want to be able to identify the element that triggered the function call.
I need a way to pass the element that was clicked on into the updateImageIcon. Here is an example of the code if you can make any sense of it. I know this don’t work but If any one can decipher what I am trying to do and help me out, I would be most appreciative.
function stuff()
{
…
icon_image = document.getElementById(iconID);
icon_image.onmouseup = updateImageIcon;
…
}
function updateImageIcon(elementID)
{
icon = document.getElementById(elementID)
alert(icon.src);
}