Anonymous functions IE issue/problem in Javascript

Posted by Bragaadeesh on Stack Overflow See other posts from Stack Overflow or by Bragaadeesh
Published on 2010-05-05T19:25:56Z Indexed on 2010/05/05 19:28 UTC
Read the original article Hit count: 214

Hi guys,

I am having a javascript written like this.

imageDiv.onclick = function(){xyz.deleteImage(param1, param2);return false;};

Now things are fine in Firefox, Chrome and Safari. But I have a strange issue in Internet Explorer. What happens is, when I click on the imageDiv in my page, the deleteImage() method is getting invoked twice. One being the actual deleteimage() method thats given here and another is the deleteimage() method that I have in the page. How to resolve this issue. Please help.

© Stack Overflow or respective owner

Related posts about internet-explorer

Related posts about JavaScript