The values in that hidden is d1,d2,d3,d4
var globalFileTypeId = document.getElementById('hdnFileDescription').value.split(',');
alert(globalFileTypeId[0]); // d1
alert(globalFileTypeId[1]); // d2
alert(globalFileTypeId[2]); // d3
alert(globalFileTypeId[3]); // d4
Now i remove the 1st index value from the array,
globalFileTypeId.splice(globalFileTypeId.indexOf(1), 1);
That mean i am trying to remove d2 but the d4 is removed.
alert(globalFileTypeId); Now the value is d1,d2,d3
Whyyyyy?
...
Go to the complete details ...