Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

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

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Thanked 0 Times in 0 Posts

    Default 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:


    Right now it looks closed, like this:


    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(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','','');


    Then there are also CSS and JS files linked to this HTML file:

    Many thanks!

  2. #2
    Super Moderator
    Join Date
    Jun 2013
    So. Maryland, USA
    My Mood
    Thanked 698 Times in 680 Posts

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

    Moved to Other Languages.

    Welcome to the forum! Thanks for taking the time to learn how to post code correctly. If you haven't already, please read this topic to learn other useful info for new members.

Similar Threads

  1. Replies: 2
    Last Post: June 22nd, 2013, 10:30 AM
  2. Trying to get an "if" statement to work in a "for loop".
    By JAKATAK in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 1st, 2013, 11:16 PM
  3. How can I make a JDialog to make main Frame to "sleep"
    By piulitza in forum AWT / Java Swing
    Replies: 1
    Last Post: May 11th, 2012, 08:00 AM
  4. "net use" command not working
    By java_techie in forum Java Networking
    Replies: 0
    Last Post: April 5th, 2012, 04:30 AM
  5. [SOLVED] "possible loss of precision", except not, code doesn't work, simple question
    By Perd1t1on in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 24th, 2010, 07:11 PM