Hide all elements with the same id

The code below will hide all elements with the id="XYZ123"
JavaScript


//Hide all by element id
elementCount = document.all("XYZ123").length;
for (i=0; i<elementCount; i++) {
  	document.all("XYZ123",i).style.display='none'
}

Posted by fbrefere001 on Wednesday March 1, 2006