Forums Archive Index > SmartMenus 5 > Help
Date: 28 Apr 2005 2:58 pm
more help guys I cant get this code to work and I can't figure out what is wrong. This is a school I am doing this for do we need to buy a liscense? And also please help with the code
// USE WORDWRAP AND MAXIMIZE THE WINDOW TO SEE THIS FILE
// v5
// === 1 === EXTRAS
s_hideTimeout=500;//1000=1 second
s_subShowTimeout=300;//if <=100 the menus will function like SM4.x
s_subMenuOffsetX=4;//pixels (if no subs, leave as you like)
s_subMenuOffsetY=1;
s_keepHighlighted=true;
s_autoSELECTED=false;//make the item linking to the current page SELECTED
s_autoSELECTEDItemsClickable=false;//look at IMPORTANT NOTES 1 in the Manual
s_autoSELECTEDTree=true;//look at IMPORTANT NOTES 1 in the Manual
s_autoSELECTEDTreeItemsClickable=true;//look at IMPORTANT NOTES 1 in the Manual
s_scrollingInterval=30;//scrolling for tall menus
s_rightToLeft=false;
s_hideSELECTsInIE=false;//look at IMPORTANT HOWTOS 7 in the Manual
// === 2 === Default TARGET for all the links
// for navigation to frame, calling functions or
// different target for any link look at
// IMPORTANT HOWTOS 1 NOTES in the Manual
s_target='self';//
// === 3 === STYLESHEETS- you can define different arrays and then assign
// them to any menu you want with the s_add() function
s_CSSTop=[
'#000000', // BorderColorDOM ('top right bottom left' or 'all')
'#FF9900', // BorderColorNS4
1, // BorderWidth
'#FF9900', // BgColor
1, // Padding
'#FF9900', // ItemBgColor
'#FF9900', // ItemOverBgColor
'#000000', // ItemFontColor
'#FFFFFF', // ItemOverFontColor
'verdana,arial,helvetica,sans-serif', // ItemFontFamily
'10px', // ItemFontSize (css)
'1', // ItemFontSize Netscape4 (look at KNOWN BUGS 3 in the Manual)
'bold', // ItemFontWeight (bold/normal)
'left', // ItemTextAlign (left/center/right)
3, // ItemPadding
1, // ItemSeparatorSize
'#FF9900', // ItemSeparatorColor
'', // IEfilter (look at Samples\IE4(5.5)Filters dirs)
true, // UseSubImg
'../images/arrow.gif', // SubImgSrc
'../images/arrowover.gif', // OverSubImgSrc
7, // SubImgWidth
7, // SubImgHeight
5, // SubImgTop px (from item top)
'#8A8CCC', // SELECTED ItemBgColor
'#FFFFFF', // SELECTED ItemFontColor
'../images/arrowover.gif', // SELECTED SubImgSrc
true, // UseScrollingForTallMenus
'../images/scrolltop.gif', // ScrollingImgTopSrc
'../images/scrollbottom.gif', // ScrollingImgBottomSrc
68, // ScrollingImgWidth
12, // ScrollingImgHeight
'', // ItemClass (css)
'', // ItemOverClass (css)
'', // SELECTED ItemClass (css)
0, // ItemBorderWidth
'#FF9900', // ItemBorderColor ('top right bottom left' or 'all')
'#FFFFFF', // ItemBorderOverColor ('top right bottom left' or 'all')
'#FFFFFF', // SELECTED ItemBorderColor ('top right bottom left' or 'all')
0, // ItemSeparatorSpacing
'' // ItemSeparatorBgImage
];
// === 4 === MENU DEFINITIONS
s_add(
{
N:'Home', // NAME
LV:1, // LEVEL (look at IMPORTANT NOTES 1 in the Manual)
MinW:130, // MINIMAL WIDTH
T:15, // TOP (look at IMPORTANT HOWTOS 6 in the Manual)
L:0, // LEFT (look at IMPORTANT HOWTOS 6 in the Manual)
P:true, // menu is PERMANENT (you can only set true if this is LEVEL 1 menu)
S:s_CSSTop // STYLE Array to use for this menu
},
[ // define items {U:'url',T:'text' ...} look at the Manual for details
{U:'http://www.plentywood.k12.mt.us/',T:'Home'}
]
);
s_add(
{N:'Student_Activities',LV:1,MinW:130,T:15,L:74,P:true,S:s_CSSTop},
[
{Show:'Athletics',U:'',T:'Athletics'},
{Show:'Clubs',U:'',T:'Clubs'},
{Show:'Fine_Arts',U:'',T:'Fine Arts'}
]
);
s_add(
{N:'Atheletics',LV:2,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
[
{Show:'Athletics',U:'',T:Athletics',
{Show:'Clubs',U:'',T:Clubs',
{Show:'Fine_Arts',U:'',T:Fine_Arts',SeparatorSize:0}
]
);
s_add(
{N:'Atheletics',LV:3,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
[
{U:'http://www.plentywood.k12.mt.us/Football.htm',T:'Football},
{U:'http://www.plentywood.k12.mt.us/Volleyball.htm',T:'Volleyball'},
{U:'http://www.plentywood.k12.mt.us/gb.htm',T:'Girls Basketball'},
{U:'http://www.plentywood.k12.mt.us/bb.htm',T:'Boys Basketball'},
{U:'http://www.plentywood.k12.mt.us/track.htm',T:'Track'},
{U:'http://www.plentywood.k12.mt.us/golf.htm',T:'Golf'},
{U:'http://www.plentywood.k12.mt.us/Cheerleading.htm',T:'Cheerleading'}
]
);
s_add(
{N:'Clubs',LV:3,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
[
{U:'http://www.plentywood.k12.mt.us/ffa.htm',T:'FFA'},
{U:'http://www.plentywood.k12.mt.us/fccla.htm',T:'FCCLA'},
{U:'http://www.plentywood.k12.mt.us/df.htm',T:'Drama And Film Club'},
{U:'http://www.plentywood.k12.mt.us/spanish.htm',T:'Spanish Club'},
{U:'http://www.plentywoodproductions.com',T:'Plentywood Productions'},
{U:'http://www.plentywood.k12.mt.us/nhs.htm',T:'NHS'}
]
);
s_add(
{N:'Fine_Arts',LV:3,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
[
{U:'http://www.plentywood.k12.mt.us/music.htm',T:'Music'},
{U:'http://www.plentywood.k12.mt.us/sd.htm',T:'Speech And Drama'}
]
);
It looks off here but it isnt in the code thanks in advance.
Date: 29 Apr 2005 2:17 am
At first sight I noted some missing brackets and quotation marks:
s_add(
{N:'Atheletics',LV:2,MinW:130,T:'',L:'',P:false,S:s_CSSTop},
[
{Show:'Athletics',U:'',T:'Athletics'},
{Show:'Clubs',U:'',T:'Clubs'},
{Show:'Fine_Arts',U:'',T:Fine_Arts',SeparatorSize:0}
]
);
Please check your configuration file for any other possible syntax mistakes. If you still have problems you can't cope with on your own, it would help very much if you could post here an URL with example.
Date: 29 Apr 2005 10:28 am
Sorry about bothering you so much I am so new to this and had to learn this in a week. The problem that is going on is the drop down menus are even working and I cant provide a link as it is not even up yet.