Apologies for deliberately cross-posting, but I have an issue where a JavaScript array in SharePoint is showing a different length from HTML (and an incorrect one!)
Updated original to add test javascript
Apologies for deliberately cross-posting, but I have an issue where a JavaScript array in SharePoint is showing a different length from HTML (and an incorrect one!)
Updated original to add test javascript
I would need to see your javascript code ;) rergardless if its a c&p job! what works for one doesnt mean it would work for another.
Javascript is tempramental in code where sharepoint is not as bad!
As for your code do you have a trailing comma in your code??
this guy explains the issue in more detail :) cba to re-invent the wheel lol
No. IE incorrectly interprets a single trailing comma as an elision and adds one to the length when it shouldn't (ECMA-262 sect. 11.1.4).
Length of Array Differs In Internet Explorer With Trailing Comma.
hope this helps :)