View Single Post
Old 06-19-2003, 04:11 PM   PM User | #8
Vladdy
Senior Coder

 
Join Date: Jun 2002
Location: Nashua, NH
Posts: 1,724
Thanks: 0
Thanked 0 Times in 0 Posts
Vladdy is an unknown quantity at this point
While getElementsByTagName is part of the core DOM specification:
http://www.w3.org/TR/2000/REC-DOM-Le...l#ID-745549614
getElementsByName is defined only for the HTMLDocument object.
http://www.w3.org/TR/2003/REC-DOM-Le...ml#ID-26809268

Considering your particular example:
1. Starting HTML 4.01 (maybe earlier) name attribute can not be used with div element (and most elements as well). It was left mostly for backward compatibility with form elements. So you should not be using it like that.
2. You can retrieve the same list of nodes by:
document.getElementsById('myid').getElementsByTagName('div');
or if you remove all the extra white space within the myid element by simple:
document.getElementsById('myid').childNodes

EDIT beetle edited his replay behind by back
__________________
Vladdy | KL
"Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

Last edited by Vladdy; 06-19-2003 at 04:18 PM..
Vladdy is offline   Reply With Quote