Solved

treeview

Posted on 2011-02-24
1
445 Views
Last Modified: 2012-06-21
hey guys can any one help me.

i am trying to do a javascript to expand a node in a treeview
<script type="text/javascript">
function GetSelectedNode() {
    var treeViewData = window["<%=TreeView1.ClientID%>" + "_Data"];
    if (treeViewData.selectedNodeID.value != "") 
    {
        var selectedNode = document.getElementById(treeViewData.selectedNodeID.value);
        var value = selectedNode.href.substring(selectedNode.href.indexOf(",") + 3, selectedNode.href.length - 2);
        var text = selectedNode.innerHTML;
        alert("Text: " + text + "\r\n" + "Value: " + value);
    } else {
        alert("No node selected.")
    }
    return false;
}
</script>

Open in new window

0
Comment
Question by:JCWEBHOST
1 Comment
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
ID: 34968961
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now