I am Working on Javascript on a jenkins plugin using maven and I have this code:
function arrayElements(element, index, array)
{
var arrayPaths = element.split("\\");
var projectSource = arrayPaths[2];
var array = element.split("_");
if (projectSource === global ) {
if (array[2]===filtro){
document.getElementById("source").options.add(new Option(arrayPaths[3], element));
}
}
}
function fillCompiledSource(object, projects)
{
document.getElementById("source").innerHTML = "";
global = document.getElementById("branches").value;
projects.forEach(arrayElements)
}
var projects = new Array();</script><script>
function fillCombo()
{
document.getElementById("source").innerHTML = "";
global = document.getElementById("branches").value;
var array = document.getElementById("branches").value.split('/');
global = array[1];
projects.forEach(arrayElements)
}
This fail only in internet explorer and only when document Mode is IE8 standarts I don't know what is the reason and how I can resolve that..
Pd: The Internet explorer is 10
Yeap, its because IE8 does not implement Array.forEach
(neither many other more modern JS methods). If you need to work in IE8, you will have to shim it (see the compatibility section).
By the way, MDN has resources for most of the other unsupported methods too.