Good afternooon,
Let me start of by saying, i see alot of posts about this subject, and included/tried alot of them to fix the issue that i have.
Now the thing is, im trying to figure out about compatibility modes with the several browsers that are available. Im struggling with Iexplorer, almost every version..
Everything i try, on several kinds of scripts just dont work in that browser and do in all the others.
The main issue i have is with getElemtsByClassName. For instance with this:
var tag = window.document.getElementsByClassName("kat");
It always returns in this: Object doesn't support property or method 'getElementsByClassName'.
I've seen this issue alot on the web, also in here, is there someone who has some info on bypassing this issue? Tried some stuff out to like changing it into:
var tag = window.getElementsByClassName("kat");
or
var tag = getElementsByClassName("kat");
But, i'm guessing im thinking in the wrong direction.. Can someone give me a hint or a link to read on how to solve something like this?
This is the header i normally use, wich i read should solve alot of issues:
<!doctype html>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
As one of my examples:
function insDiv() {
var tag = window.document.getElementsByClassName("kat"), total = 0;
for (var i in tag)
{
total += tag[i].checked && !isNaN(Number(tag[i].value)) ? Number(tag[i].value) : 0;
}
window.document.getElementById("insDiv").innerHTML = 'Kat: ' + total.toFixed(2);
}
Wich works perfectly in chrome/firefox/etc. just not in Iexplorer.