View Single Post
Old 06-19-2003, 02:23 PM   PM User | #1
pitchoo
New Coder

 
Join Date: Jun 2002
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
pitchoo is an unknown quantity at this point
DOM: How to get a node element from an object id?

Hello,

I want to make a call like this (instead of document.getElementsByName("ANOTHERID")):

document.getElementById("MYID").getElementsByName("ANOTHERID")

Why can't I make this function call?

When accessing the object like the example below, there is no problem:

myBody=myDocumentElements.item(0);
myBodyElements=myBody.getElementsByTagName("p");

How can I get the element from the object I retrieve by using the getElementById function?
pitchoo is offline   Reply With Quote