Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help with rollover menu

    Hi Everyone,

    I don't have the javascript experience to modify my code to add a submenu, to a submenu. My navigation rollover menu contains one level of submenus but it looks like I will need three or four. I've pasted the code I'm using below. But in specific, I know that I have to modify this code somehow, for example to add a submenu when someone rolls over RFABB:

    addmenu(menu=["addOnBoards",
    ,,sMenuWidth,menuBorder,"",mStyle2,,"left",,,,,,,,,,,,,
    ,"GSample HS","#",,,1
    ,"TEB Apps Board","#",,,1
    ,"HIB","#",,,1
    ,"RFABB","#",,,1
    ,"Debug Board","#",,,1
    ])

    Thank you,

    SR
    --------------------------------------------------------------------------
    selStyle="offfontcolor=003300;onfontcolor=003300;onbackcolor=ffffff;offbackcolor=ffffff;"
    childStyle="offfontcolor=003300;onfontcolor=003300;onbackcolor=ffffff;offbackcolor=99CC99;"

    // This represents the L0 level navigation (menu containers)
    mStyle1=
    [ // mStyle1 is an array of properties. You can have as many property arrays as you need.
    //This means that menus can have their own style.
    "990000", // Mouse Off Font Color
    "CECDCD", // Mouse Off Background Color
    "990000", // Mouse On Font Color
    "ffffff", // Mouse On Background Color
    "000000", // Menu Border Color
    11, // Font Size in pixels
    "normal", // Font Style (italic or normal)
    "normal", // Font Weight (bold or normal)
    "Verdana", // Font Name
    4, // Menu Item Padding

    "http://wireless.sc.ti.com/graphics/wireless/expand_black.gif", // Sub Menu Image (Leave this blank if not needed)
    , // 3D Border & Separator bar
    , // 3D High Color
    , // 3D Low Color
    , // Current Page Item Font Color (leave this blank to disable)
    , // Current Page Item Background Color (leave this blank to disable)
    , // Top Bar image (Leave this blank to disable)
    "ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
    "000099", // Menu Header Background Color (Leave blank if headers are not needed)
    "000000", // Menu Item Separator Color
    ]

    mStyle2=[ // style2 is an array of properties. You can have as many property arrays as you need. This means that menus can have their own style.
    "990000", // Mouse Off Font Color
    "CECDCD", // Mouse Off Background Color
    "990000", // Mouse On Font Color
    "ffffff", // Mouse On Background Color
    "000000", // Menu Border Color
    11, // Font Size in pixels
    "normal", // Font Style (italic or normal)
    "normal", // Font Weight (bold or normal)
    "Verdana", // Font Name
    4, // Menu Item Padding
    , // Sub Menu Image (Leave this blank if not needed)
    , // 3D Border & Separator bar
    , // 3D High Color
    , // 3D Low Color
    , // Current Page Item Font Color (leave this blank to disable)
    , // Current Page Item Background Color (leave this blank to disable)
    , // Top Bar image (Leave this blank to disable)
    "ffffff", // Menu Header Font Color (Leave blank if headers are not needed)
    "000000", // Menu Header Background Color (Leave blank if headers are not needed)
    "000000", // Menu Item Separator Color
    ]

    menuWidth=150; // The width of the main menu container
    sMenuWidth=150; // The width of the pop-up menu containers.
    menuTop=135; // The Top position of the menu in pixels
    smenuTop=165;
    menuLeft="offset=-1"; // The Left position of the menu in pixels
    menuBorder=1; // Menu Border Width
    screenPos="left"; // Screen Position - here you can use "center;left;right;middle;top;bottom"
    timegap=500; // The time delay for menus to remain visible
    followspeed=5; // Follow Scrolling speed
    followrate=15; // Follow Scrolling Rate
    suboffset_top=1; // Sub menu offset Top position
    suboffset_left=-1; // Sub menu offset Left position
    suboffset2_top=1; // Sub menu offset Top position
    suboffset2_left=-100; // Sub menu offset Left position

    menunum=0;menus=new Array();_d=document;function addmenu(){menunum++;menus[menunum]=menu;}function dumpmenus(){mt="<script language=javascript>";for(a=1;a<menus.length;a++){mt+=" menu"+a+"=menus["+a+"];"}mt+="<\/script>";_d.write(mt)}

    addmenu(menu=["mainmenu",menuTop,menuLeft,menuWidth,menuBorder,"left",mStyle1,1,"left",,0,0,,,,,,,,,,
    ,"MDP Main Board","show-menu=rv","http://www.yahoo.com","#",1
    ,"MDP Add-On Boards","show-menu=addOnBoards","http://www.yahoo.com","#",1
    ,"MDP SW","show-menu=sw","http://www.yahoo.com","#",1
    ,"Support","http://www.yahoo.com","#","#",1
    ,"Order","http://www.yahoo.com","#","#",1
    ,"Repair","http://www.yahoo.com","#","#",1
    ,"Upgrade","http://www.yahoo.com","#","#",1
    ,"Getting Started","show-menu=gettingStarted","http://www.yahoo.com","#",1
    ,"Quality","show-menu=bugReport","http://www.yahoo.com","#",1

    ])

    addmenu(menu=["rv",,,sMenuWidth,menuBorder,"",mStyle2,,"left",,,,,,,,,,,,,
    ,"Revisions 1","#",,,1
    ,"Revisions 2","#",,,1
    ])


    addmenu(menu=["addOnBoards",
    ,,sMenuWidth,menuBorder,"",mStyle2,,"left",,,,,,,,,,,,,
    ,"GSample HS","#",,,1
    ,"TEB Apps Board","#",,,1
    ,"HIB","#",,,1
    ,"RFABB","#",,,1
    ,"Debug Board","#",,,1
    ])
    addmenu(menu=["sw",
    ,,sMenuWidth,menuBorder,"",mStyle1,,"left",,,,,,,,,,,,,
    ,"Flashing Tool","#",,,1
    ,"Board Diagnostic","#",,,1
    ])
    addmenu(menu=["gettingStarted",
    ,,sMenuWidth,menuBorder,"",mStyle2,,"left",,,,,,,,,,,,,
    ,"Quick Start (pdf)","#",,,1
    ,"User Guide (pdf)","#",,,1
    ])

    addmenu(menu=["bugReport",
    ,,sMenuWidth,menuBorder,"",mStyle2,,"left",,,,,,,,,,,,,
    ,"Bug Report","#",,,1
    ])



    dumpmenus()
    Last edited by dhx10000; 10-13-2005 at 07:58 PM.

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,534
    Thanks
    3
    Thanked 513 Times in 500 Posts
    where to start with the snippet you posted?????????????

    suggest you find a menu designed for multiple levels

    I have one for four or five levels somewhere if required


  •  

    Posting Permissions

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