Hello I'm trying to do an event observe work on IE, it works good on
FF and Chrome, this is the script. When the newImg.observe() is
reached I catch an exception with this msg "'src' is undefined"

function addImage(src, div) {
        var newImg = document.createElement("img");
        newImg.id="Image"+div;

        document.getElementById("img"+div).appendChild(newImg);
        papa=document.getElementById("img-upload");
        document.getElementById("img"+div).style.display="block";
        hijo=document.getElementById("upload"+div).style.display="none";

        newImg.src = src;
         newImg.observe('load', loadcrop);
}

function loadcrop(evt)
{

        img = evt.findElement();
        var txt = new String(img.id);
        addCrop(txt.slice(5,6));
}

Thanks if you can help me solve this problem.

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to