Explorer based on tree : Tree « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Event
7. Event onMethod
8. Form Control
9. GUI Components
10. HTML
11. Javascript Collections
12. Javascript Objects
13. Language Basics
14. Node Operation
15. Object Oriented
16. Page Components
17. Security
18. Style Layout
19. Table
20. Utilities
21. Window Browser
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
JavaScript DHTML » GUI Components » Tree 
Explorer based on tree

<html>
<head>
<title>DynAPI Examples - Explorer</title>
<script language="JavaScript" src="./dynapisrc/dynapi.js"></script>
<script language="Javascript">
  dynapi.library.setPath('./dynapisrc/');
  dynapi.library.include('dynapi.api');
  dynapi.library.include('dynapi.gui.BorderManager');
  dynapi.library.include('Explorer');
  dynapi.library.include('ExplorerBlockStyle'); //Optional
</script>
<script language="Javascript">

  var  s = Styles.getStyle('Explorer');
  var file1 = s.getStyleAttribute('imageFile');
  var env = dynapi.functions.getImage('./dynapiexamples/images/envelope.gif',15,18);

  var exp = new Explorer(70,100);
  exp.setBgColor('#EEEEEE');

  exp.addLeave("root","Root Folder");
    // Groceries
    exp.addLeave("groc","Groceries","root");
    exp.addLeave("flour","Flour","groc",file1);
    exp.addLeave("sugar","Sugar","groc",file1);
    exp.addLeave("choc","Chocolate","groc",file1);
      // Cakes
      exp.addLeave("cake","Cakes","groc");
      exp.addLeave("plain","Plain Cake","cake",file1);
      exp.addLeave("ccake","Chocolate Cake","cake",file1);
    // Fruits
    exp.addLeave("fruit","Fruits","root");
    exp.addLeave("mango","Mango","fruit",file1);
    exp.addLeave("apple","Apple","fruit",file1);
    exp.addLeave("grape","Grapes","fruit",file1);
  exp.addEventListener({
    onselect : function(e) {
      status=("Current ID is: "+e.getSource().currentPos+" and currentUrl is: "+e.getSource().currentUrl);
    }
  });
  dynapi.document.addChild(exp);

  var exp2 = new Explorer(270,100,null,null,'ExplorerBlock');
  exp2.addLeave("root",'<font color="green"><b>Emails<b></font>');
    // Groceries
    exp2.addLeave("ib",'<font color="Navy"><b>Inbox<b></font>',"root");
    exp2.addLeave("flour",'<font color="red">Just stop to say Hi..<br>Be of good cheer</font><hr>',"ib",env);
    exp2.addLeave("sugar",'<font color="black">This is a very long message<br>with a lot of <br>breaks...</font><hr>',"ib",env);
    exp2.addLeave("choc",'Chocolate',"ib",env);
      // Cakes
      exp2.addLeave("ar",'Archive',"ib");
      exp2.addLeave("plain",'Plain Cake',"ar",env);
      exp2.addLeave("ccake",'Chocolate Cake',"ar",env);
    // Fruits
    exp2.addLeave("ob",'<font color="maroon"><b>Outbox<b></font>',"root");
    exp2.addLeave("mango",'Mango',"ob",env);
    exp2.addLeave("apple",'Apple',"ob",env);
    exp2.addLeave("grape",'Grapes',"ob",env);
  dynapi.document.addChild(exp2);

</script>
</head>
<body bgcolor="#ffffff">
<script>
  dynapi.document.insertAllChildren();
</script>
</body>
</html>

           
       
dynapi.zip( 791 k)
Related examples in the same category
1. Yahoo! UI Library - Tree Control
2. Yahoo! UI Library - Tree Control 2
3. Tree Control
4. Dynamic TreeView Example
5. Yahoo! UI Library - Tree Control 3
6. Yahoo! UI Library - Tree Control 4
7. Yahoo! UI Library - Tree Control 5
8. Build a tree in JavaScript
9. Delete, insert items in a tree
10. Tree selection action handler
11. Expand, Collapse, Close, Open selected Tree item and branch
12. Change Tree Node Color and Icon
13. Checkbox tree node: checked, unchecked, get the checked items
14. Change tree expand and collapse icons
15. Drag and Drop between trees
16. Build tree from xml
17. Tree navigation bar
18. Navigation Tree
19. Navigation Tree menu based on XML
20. XML Tree
21. Building Collapsible Trees
22. Nano Tree
23. Tree which accepts drag and drop event in JavaScript (IE)
24. Simple Tree in Javascript
25. Elegant simple tree
w_ww_._j_a_va___2s___.__c_o__m___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.