Announcement

Collapse
No announcement yet.

javascript tree menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    javascript tree menu

    Hi I hope you can help, I'm trying to integrate a javascript tree menu
    into an actinic page.

    How can I put this javascript navigation tree:-

    HYPERLINK
    "http://www.colourways.net/rscds/rscds_menu.htm"


    onto this actinic page:-

    HYPERLINK
    "http://www.colourways.net/rscds/sidenav2.html"

    As you can see I've tried to paste the javascript onto the page, but It
    does not preview.

    I've generated the javascript using a cooltreepro wizard program as my
    knowledge of javascript is limited.

    Here is the javascript code:-

    http://www.colourways.net/rscds/cooltreepro.js

    HYPERLINK
    "http://www.colourways.net/rscds/java.html"l

    (I opened the above .js file in note pad and copied into HTML page)

    I've tried placing the path to the .js file using
    ../catalog/cooltreepro.js but it returns a stack overflow message.

    Kind Regards,
    Ruth

    #2
    Hi Ruth, welcome to the forum.

    You've got all the elements you need on the rscds_menu page.

    You have correctly placed script source references in the <HEAD> section of your html.

    <script type="text/javascript" src="cooltreepro.js"></script>
    <script type="text/javascript" src="tree_nodes.js"></script>
    <script type="text/javascript" src="tree_format.js"></script>

    You should only need to place the menu initialisation code once on the page:

    <script type="text/javascript">
    var tree1 = new COOLjsTreePRO("tree1", TREE_NODES, TREE_FORMAT);
    tree1.init();
    RedrawAllTrees();
    </script>

    You have a couple of calls to RedrawAllTrees in the html, which may not be necessary (I don't have the cooltree documentation)

    I'm guessing here, but I think the first two parameters in tree_format.js:

    var TREE_FORMAT = [
    0,
    0,

    are the menu x and y positions on the page.
    If this is true, it means the menu is like my website's and is drawn in an 'absolute' position on the page.
    The 0,0 is probably coinciding with the blue area and is being masked.
    Try moving it to somewhere else on the page.


    Alan Compton
    www.greenknightgames.co.uk
    Great board games and cards games you won't find in the High Street

    Comment

    Working...
    X