I'm working on a application that needs to use the DOM to dynamically edit attributes for elements. But for some reason Internet Explorer doesn't recognize the command setAttribute(attribute, value)
On the first line I'm populating the imagemap with the data I got from the server. Line 2 makes the imagemap reference and line 3 should set the new imagemap. But on testing the attribute stays the same.
Anyway to get around this in IE? It works great in Firefox.
Code:
document.getElementById("mapimage").innerHTML = data[map][5];
var usemap = "#" + data[map][0];
document.getElementById("trans").setAttribute("usemap", usemap);
On the first line I'm populating the imagemap with the data I got from the server. Line 2 makes the imagemap reference and line 3 should set the new imagemap. But on testing the attribute stays the same.
Anyway to get around this in IE? It works great in Firefox.