Topic awaiting preservation: How to access div element by index |
|
---|---|
Author | Thread |
Bipolar (III) Inmate From: Phoenix |
posted 10-15-2002 17:02
Howdy folks, the following code works great: |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 10-15-2002 17:05
The poster has demanded we remove all his contributions, less he takes legal action. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-15-2002 17:07
Well, I'm a little confused, since what you're calling "divObj" is really a Window object. To get to the DIV with id="club" inside the divObj window, you should ideally be using divObj.document.getElementById('club'), for standards compliance. |
Bipolar (III) Inmate From: Phoenix |
posted 10-15-2002 17:14
I was assuming that the document element contained a collection of DIV elements and that you could reference them via INDEX. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 10-15-2002 17:36
Note that if you want an array of all the DIV elements in the page, you can use |
Paranoid (IV) Mad Scientist From: Somewhere over the rainbow |
posted 10-15-2002 19:48
The poster has demanded we remove all his contributions, less he takes legal action. |
Bipolar (III) Inmate From: Phoenix |
posted 10-15-2002 19:56
Very nice. Thanks guys! |