www.webdeveloper.com
Results 1 to 2 of 2

Thread: Where to place "openTo()" command to make the script work?

  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Where to place "openTo()" command to make the script work?

    Hi there,

    I am trying to make the Java tree menu (on the left sidebar of this home page - http://kb.kitya.net/wordpress.htm) to be automatically open at "Wordpress folder". Like this, see screenshot:

    http://kb.kitya.net/001.png

    Right now it looks closed, like this:

    http://kb.kitya.net/001.png

    Per the instruction of this menu creator I could use command

    mytree.openTo(4, true);


    I tried placing command mytree.openTo(4, true); in various places, but it doesn't make things work.

    Can you please help me out to apply this correctly?


    The script for the menu in HTML file looks like this:

    <script type="text/javascript">
    <!--

    d = new dTree('d');
    d.add(0,-1,'My example tree');
    d.add(1,0,'GoDaddy','default.html');
    d.add(2,1,'Setup subdomain','default.html');
    d.add(3,1,'Install Wordpress','default.html');
    d.add(4,0,'Wordpress','default.html','Yeah, baby!','','');
    d.add(5,4,'Setup on server','default.html','How to manually setup Wordpress on a server');
    d.add(6,4,'One page blog','default.html','How to setup a one page blog simple Wordpress website');
    d.add(7,0,'more articles','default.html','','');
    document.write(d);

    //-->
    </script>

    Then there are also CSS and JS files linked to this HTML file:
    http://kb.kitya.net/dtree.css
    http://kb.kitya.net/dtree.js

    Many thanks!

  2. #2
    Join Date
    Dec 2012
    Posts
    54
    did you really type
    Code:
    mytree.openTo(4, true);
    as your comment suggests or did you type
    Code:
    d.openTo(4, true);
    as the script would suggest?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles