On 5/6/07, Daemach <[EMAIL PROTECTED]> wrote:

I just want to know if there is something similar for functions running
inside of
objects that are children of another object.


If you're working with DOM nodes, then you can use

myNode.parentNode (reference to myNode's parent)
myNode.firstChild (reference to myNode's the first item in myNode.childNodes
)
myNode.lastChild (reference to myNode's the last item in myNode.childNodes)
myNode.childNodes (a collection of all of myNode's children)
myNode.previousSibling (the node that appear just before myNode in the tree)
myNode.nextSibling (the node that appear just after myNode in the tree)

but if you're using a collection of generic objects, then you have to create
those relationships by yourself. Like others have said, JavaScript has no
built-in notion of any sort of heirarchy (except perhaps the prototype
chain, but that still probably is not what your looking for). I as well
cannot vouch for Dean Edwards' Base.js library, but given his reputation in
the greater JavaScript community, it is definitely worth at least looking
into.

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com

Reply via email to