attachEvent inserts events at the begin of the queue while addEventListener appends events to the qu
- by Marco Demaio
I use this simple working function to add events:
function AppendEvent(html_element, event_name, event_function)
{
if(html_element)
{
if(html_element.attachEvent) //IE
html_element.attachEvent("on" + event_name, event_function);
else if(html_element.addEventListener) //FF
…