E
emma.sax
Hi
I have the following code which is working in Firefox:
function showOptions() {
if(!document.getElementById) return false;
if(!document.getElementsByTagName) return false;
var lnks = document.getElementsByTagName("a");
for(var i=0; i<lnks.length; i++) {
alert(lnks.getAttribute("class"));
if(lnks.getAttribute("class") == "toggle") {
lnks.onclick = function() {
var options = document.getElementById("multiretailers");
options.style.display="block";
}
}
}
}
I understand that IE doesn't like he getAttribute() method and is
returning null for the class name.
What are the work arounds for this?
Thanks
M
I have the following code which is working in Firefox:
function showOptions() {
if(!document.getElementById) return false;
if(!document.getElementsByTagName) return false;
var lnks = document.getElementsByTagName("a");
for(var i=0; i<lnks.length; i++) {
alert(lnks.getAttribute("class"));
if(lnks.getAttribute("class") == "toggle") {
lnks.onclick = function() {
var options = document.getElementById("multiretailers");
options.style.display="block";
}
}
}
}
I understand that IE doesn't like he getAttribute() method and is
returning null for the class name.
What are the work arounds for this?
Thanks
M