As far as I can see, the problem occurs on this line:
window.location="my_details.html?"+ c + "_";
It can be written as:
window.location="my_details.html?"+ c.toString() + "_";
By default .toString() JavaScript Array will use a delimiter,, i.e.
var str = ["1", "2", "3"].toString();
In your example, the separator used is a space. This would be modified by something that changed the default .toString() default Array.prototype to Array.prototype . Try using the following:
window.location="my_details.html?"+ c.join(",") + "_";
source share