1

How to find the parent of an ASP.NET TreeView node in JavaScript?

1
  • 1
    You should accept answers that most helped you resolve the problem by clicking the empty check-mark beside that answer, this helps everyone out: give you rep, gives them rep, makes the answer easier for the next person to find :) Commented Mar 21, 2010 at 12:13

1 Answer 1

2

You need to get the element's ClientID, then call getElementById and check the parentNode, like this: (In a <script> block on the page)

document.getElementById('<%=myTreeView.ClientID%>').parentNode
Sign up to request clarification or add additional context in comments.

1 Comment

What's a <scipr> block, is that HTML5? :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.