Two Laptop Bag
The moose likes HTML, CSS and JavaScript and the fly likes How to get the parent div? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to get the parent div?" Watch "How to get the parent div?" New topic

How to get the parent div?

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 294
Hi ranchers,
I am working on JS TreeView control.
I am trying to get the parent div id of the current node selected:

How can I get wrapping div object or Div id (tree-1) from within promptDivId function?

promptDivId :

Thank you.

Tree code:

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Look into parentNode

I agree. Here's the link:
subject: How to get the parent div?
jQuery in Action, 3rd edition