• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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(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!

P.S. Is this the right forum to post to or I should be posting to forum of another language? If so, can you please advise for which language?
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Java and Javascript are two unrelated languages (other than their confusingly similar names) and this is a Javascript question so I'll move it to a more appropriate forum for you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic