Results 1 to 4 of 4

Thread: sdNestedMenu help please

  1. #1
    Join Date
    May 2007
    Location
    Mythica
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default sdNestedMenu help please

    1) Script Title: Slashdot Menu

    2) Script URL (on DD):Original code script -
    http://www.dynamicdrive.com/dynamicindex1/slashdot.htm

    sdnested variation code by Ictinus
    http://www.ictinus.com/sdNestedMenu/simple_example.html

    3) Describe problem: so I am using the sdnested adaptation by Ictinus. Every thing works great except how do I stop this:



    from popping up each time the page loads?


    my site: http://pixel2.alittlebitofmagick.com/

  2. #2
    Join Date
    May 2007
    Location
    Mythica
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    help please

  3. #3
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    76
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Hi SilverWolf,
    good to see you got the page working!

    To solve your problem, look into the sdnestedmenu.js file for the following line:
    Code:
    //defaultStates - An array of zeros and ones (0,1,1,0) that represent open (0) and closed (1) menus.
    //if the array is empty, no default state of menu will be loaded. if the array has values, but not as many as there are menus, you will be alerted.
    var defaultStates = new Array(0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,1,1);
    If you don't want to define any submenu as open on page load then replace that line with:
    Code:
    var defaultStates = new Array();
    If you want to set one or more menus to be open by default then add enough zeros (0) or ones (1) separated by commas until the message does not appear... hint: the message tells you that you will need 25 of them (one for each submenu including child submenus).
    Cheers.

  4. #4
    Join Date
    May 2007
    Location
    Mythica
    Posts
    24
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile

    Quote Originally Posted by Ictinus View Post
    Hi SilverWolf,
    good to see you got the page working!

    To solve your problem, look into the sdnestedmenu.js file for the following line:
    Code:
    //defaultStates - An array of zeros and ones (0,1,1,0) that represent open (0) and closed (1) menus.
    //if the array is empty, no default state of menu will be loaded. if the array has values, but not as many as there are menus, you will be alerted.
    var defaultStates = new Array(0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,1,1);
    If you don't want to define any submenu as open on page load then replace that line with:
    Code:
    var defaultStates = new Array();
    If you want to set one or more menus to be open by default then add enough zeros (0) or ones (1) separated by commas until the message does not appear... hint: the message tells you that you will need 25 of them (one for each submenu including child submenus).
    Cheers.
    Ok I got this figured out now. So I added more "0"s and "1"s to the code to equal the number of the default state to the number of menus I have and the thing doesn't pop up any more. Thank you for all your help Ictinus.

Bookmarks

Posting Permissions

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