Hi, i have a problem again
Note: I’ve searched the forum for a solution with no luck;
I am dynamically creating images in a table with javascript, assigning each image an id and an onclick event. like this
image = document.createElement(“img”);
image.style.width = “160px”;
image.style.height = “120px”;
image.src = source;
image.alt = alternate;
image.setAttribute(“id”, “image”+itt);
image.setAttribute(“onclick”, “test(this.id)”);
Now this works fine in Firefox (the onclick is recognized and the function is executed) but in IE, the onclick won’t fire, as if it’s not recognized.
As a side note: using: image.onclick = “test(this.id)” doesn’t work in either Firefox or IE
Any help would be greatly appreciated
Thank you