[thelist] [DHTML] Elements with the same ID

Emma Jane Hogbin emmajane at xtrinsic.com
Tue Mar 18 23:07:02 CST 2003


On Wed, Mar 19, 2003 at 03:47:28PM +1100, Mark M wrote:
> If you have multiple elements that have the same id in a page.. can you access 
> them all through the same ID? or does the system automatically create an array 
> you can loop through under that ID?

Ahhh, no. IDs must be unique. You could access them through the images
array though...or you could give them all variations on the same name
e.g.:
	slide1
	slide2
	slide3
Then you could use indexOf("slide") to check and see if the word "slide"
occured in the ID name.

hope that helps

emma


-- 
Emma Jane Hogbin
[[ 416 417 2868 ][ www.xtrinsic.com ]]


More information about the thelist mailing list