Can someone shed some light on the behavior of javascript getElementById() when there are elements with duplicate IDs in HTML DOM??
If you have multiple elements with the same id, you can select them all with
document.querySelectorAll("[id='myid']")
However, if you are in control of it you should just fix the HTML.