This is only a problem for IE7. I'll explain with a psuedoexample:
Code: Select all
<div id="container">
<div style="height:25px; width:25px;" onClick="refreshDiv();"></div>
</div>
Code: Select all
<div id="container">
<div style="height:25px; width:25px;" onClick="refreshDiv();">Clicked 1 Time, try to click again</div>
</div>
I imagine that the problem is that Internet Explorer processes all the events for elements on the page on the initial page load. I am using mootools, but for my specific needs it is much easier to just use the onclick attribute as I am iterating through a list and each element of the list needs unique parameters for the function. (But if I must I suppose I could generate the javascript code necessary to add event listeners to each element)
Does anyone know how to deal with this issue?
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: