PDA

View Full Version : sdNestedMenu help please



SilverWolf
11-13-2007, 09:27 PM
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:

http://i36.photobucket.com/albums/e47/trishagj/Image1-1.gif

from popping up each time the page loads?


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

SilverWolf
11-15-2007, 04:18 AM
:( help please

Ictinus
11-15-2007, 12:55 PM
Hi SilverWolf,
good to see you got the page working!

To solve your problem, look into the sdnestedmenu.js file for the following line:

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

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.

SilverWolf
11-15-2007, 08:33 PM
Hi SilverWolf,
good to see you got the page working!

To solve your problem, look into the sdnestedmenu.js file for the following line:

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

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.:D