Actually, When a user click on a button, I coded a script that generates a block of html elements sort of like this- <div id='some_id' onMouseOver='function()' onMouseOut='function()'>contents</div> and there, I have another script such that when a user clicks on the generated div elements, it should remove the attributes onMouseOver and onMouseout. document.getElementById(id).removeAttribute('onMouseOut'); Code (markup): I got the expected result when executed under FF but IE simply fails to remove the attributes. Please help!
dunno exactly why it's not being called in IE, but http://reference.sitepoint.com/javascript/Element/removeAttribute tells you that support for removeAttribute is buggy in nearly all browsers. why not set some global flag that tells your onmouseover= and onmouseout= handlers whether or not to proceed with their code?