Hey guys,
I don’t understand how to fix this, it works fine in Firefox but when IE tries to use this file it gives me an error and says that “childNodes.0.tagName is null or not a tag name”. Any help would be great!! Here is the .js file script:
<script type="text/javascript">
var elem = "TR";
var rClick;
window.onload = function(){
if(document.getElementsByTagName){
var el = document.getElementsByTagName(elem);
for(var i=0; i<el.length; i++){
if(el*.childNodes[0].tagName != "TH"
&& el*.parentNode.parentNode.className.indexOf("tbl") != -1){
if(i%2 == 1){
el*.className = "on";
el*.oldClassName = "on";
el*.onmouseout = function(){
this.className = "on";
}
} else {
el*.className = "off";
el*.oldClassName = "off";
el*.onmouseout = function(){
this.className = "off";
}
}
el*.onmouseover = function(){
if(this.className == this.oldClassName)
{this.className = "hover";}
if(this.onmouseout == null && this.className != "click"){
this.onmouseout = function(){
this.className = this.oldClassName;
}
}
}
el*.onclick = function(){
if(this.className != "click"){
this.className = "click";
} else {
this.className = this.oldClassName;
}
this.onmouseout = null;
}
}
}
}
}
</script>