The JS code doesn't make much sense. getElementById()
returns 0 or 1 DOM element: the element which has the ID passed as argument, and which is supposed to be unique in the whole document.
You have several checkboxes, and assigned the same ID to each of them, which makes your HTML code invalid. Since you want to get the values of all the checked checkboxes, you need to iterate on them. To find them, you can use their name, since they all share the same one. At each iteration, you'll determine if the current checkbox is checked, get its value attribute, and add it to an array. And you can then pass this array to your parent window.