I have 2 elements in my html document with the same id. And my requirement is not to change it. How can I get the count of elements with the same id in a javascript method? When the page loads i don't want to display these elements. any suggestions??
It is invalid HTML to have more than one item with same id. Therefore, there is no supported way to do what you wish.
Why can't you fix your broken page?
If you won't fix the real problem, you may be able to loop through every element on the page keeping track of the id values yourself. [ March 01, 2007: Message edited by: Bear Bibeault ]