This is an IE specific script issue, no other browsers can see the script (conditional comments). I'm trying to fix a
very miscellaneous problem with IE (imagine that?) though in the simplest of terms IE 6/7 is
not seeing JavaScript related attributes on elements (e.g. onmouseover, onblur). I corrected a similar issue where IE was no applying CSS class attributes (IE is just outright having issues with attributes).
So any way I'm trying to re-apply the attributes without having to muck up my XHTML code with anything intended for far outdated but people-are-still-using-it browsers. The problem is that somehow (and I've encountered this before though too far back to remember how I got it working) is that the
last onmouseover attribute is applied to
all of the elements where I find the onmouseover attribute (though IE does not trigger). I can apply this almost as desired only every onmouseover event will only trigger the
last script versus their respective script. I'm pretty upset at myself for not remembering how I fixed this in the past. What am I forgetting here?
- John
P.S. - The new WebmasterWorld BBcode validator forced me to change var i to var ii.
function ie_fix_events(t)
{
if (document.getElementById('body').currentStyle.scrollbarBaseColor)
{
if (t)
{
var e = document.getElementById(t).all;
for (var ii = 0; ii < e.length; ii++)
{
if (e[ii].getAttribute('onmouseover'))
{
var a = e[ii].getAttribute('onmouseover');
e[ii].attachEvent('onmouseover', function() {eval(a);});
}
}
}
}
}