I am having trouble with a pop-up window that contains selections. After the user chooses options, I want those selected options to appear in the main window without refreshing it. I am utilizing JavaScript for this task, but I am struggling to find a way to access the checkbox items in the pop-up window from the main window.
For example:
<input type="checkbox" name="vehicle[]" value="Bike" />
<input type="checkbox" name="vehicle[]" value="car" />
var chbox = document.getElementById("vehicle[]").value;
However, this method is not working as intended.