Adi wrote:
> Okay, this issue has been annoying me for a little while now.
> I need it to work on Mozilla 1.6 & IE 6
>
> This is what I would like to be able to do:
>
> var row = document.createElement("TR");
> var tdImage = document.createElement("TD");
> var img = document.createElement("IMG");
> img.src = "results.gif";
> var theA = document.createElement("A");
> theA.setAttribute("href", "#");
> //Hack which works in both IE6 and Mozilla 1.6
> theA["onclick"] = new Function("myFunction(event, 'SomeThing')");
theA.onclick = function (evt) {
myFunction (evt ? evt : window.event, 'SomeThing');
};
--
Martin Honnen
http://JavaScript.FAQTs.com/