I have some functionality I am trying to get to work in IE – basically populating an obj event handler with a function(param) call. I have this working in FF/Opera:
obj.setAttribute(“onLoad”,”function(param)”);
It simply does not work for IE. The literature I have found seems to suggest -attachEvent- as a suitable replacement, but I haven’t had any success. Well, they haven’t been very explicit in their examples so I am not sure what I am doing wrong, but finally it looks like -attachEvent- will not accept a param in the function. It only seems to accept a function name. Is that true? If so this is the syntax I mean to represent:
obj.attachEvent(“onLoad”, function);
If this is correct, can anyone suggest a way to “pass” a param? I am thinking my only option will be to set some global variable before I -attachEvent- and then get the param from the variable while inside function. Is there a better option or am I missing anything?