I have a site with an accordion and some javascript. In Firefox, everything works as it should, but in IE11 I get an error
SCRIPT1003: Expected ':'
I narrowed it down to this piece of code in the .js file:
var nmArray = new Array(); function saveplayers() { var x; for (x=0;x<32;x++) { var y = "i"+eval(x+1); nmArray[x]=document.getElementById(y).value; } var request = $.ajax({ type: "POST", url: "savep.php", data: ({ nmArray }), cache: false }); }
The error says that there should be a colon after nmArray in ({ nmAray })
If I output this function, my site works again. For debugging, I deleted my HTML, and I donβt even call this function. I just included the .js file.
source share