Explanation of menu_items.js file.
Below is the general layout of the file,
followed by a more detailed description of every variable
and the array structure.
The red colored items belong to the Javascript
syntax and are case sensitive and critical. Var
will generate an error, so will VAR.
The quotation marks are also needed, even when a text variable is left blank the
quotation marks are needed. (An empty text string is not the same as no string)
The black colored items belong to the menu_builder.js script and must not be
changed or deleted.
The blue items can be changed and control the
behavior and appearance of the Items.Short Example
|
var NoOffFirstLineItems=2; |
Item1=new Array("","logout.htm",img_Logout.src,0,20,138,"","","","","","","","","","","","");
Item2=new Array("","javascript:void(0)",img_executivereporting.src,5,20,138,"","","","","","","","","","","","");
Item2_1=new Array("Variances by Region","/hspider/spider.dll?criteria&zworld_new.cbp&frame=no&Account=TOT_NET_REV&Frequency=M.YTD","",0,20,200,"","","","","","","","","","","","");
Item2_2=new Array("Ranking","/hspider/spider.dll?report&ENTERPRISE5&FINRPT&CBPCURAC&Account=TOT_NET_REV&Category=PRIORACT&lockhdrs=yes&tfile=zranktfie_new.htx&frame=yes","",0,20,200,"","","","","","","","","","","","Y");
Item2_3=new Array("Region Reports","javascript:void(0)","",14,20,200,"","","","","","","","","","","","");
Item2_3_1=new Array("Region A","javascript:void(0)","",4,20,138,"","","","","","","","","","","","");
Item2_3_1_1=new Array("Flash Input Summary Report - Region A","/hspider/spider.dll?report&Enterprise5&FINRPT&A_FLASH&TVIEW=NOPOV_NEW.HTX&lockhdrs=NO&FRAME=NO","",0,20,300,"","","","","","","REGION_A","","","","","");
Item2_3_1_2=new Array("Region Data Verification Report - Region A","/hspider/spider.dll?report&Enterprise5&FINRPT&CK_DATAA&TVIEW=NOPOV_NEW.HTX&lockhdrs=NO&FRAME=NO","",0,20,300,,"","","","","","","REGION_A","","","","","");
Item2_3_1_3=new Array("Region Monthly Report - Region A ","/hspider/spider.dll?report&Enterprise5&FINRPT&MONTHLYA&TVIEW=STACK2_NEW.HTX&FRAME=NO","",0,,20,300,"","","","","","","REGION_A","","","","","");
Item2_3_1_4=new Array("Region A Quality Summary ","/hspider/spider.dll?report&Enterprise5&FINRPT®A_SUM&TVIEW=STACK2_NEW.HTX&FRAME=NO","",0,20,300,"","","","","","","REGION_A","","","","","");
The variables
- NoOffFirstLineItems
- number- The number of elements in the first column of your
Item menus.
The Menu tree
All element names start with Item
The first element on the first level is called Item1.
The second element on the first level is called Item2.
The third element on the first level is called Item3 ,etc.
If Item1 has sub elements, the first of those is called Item1_1, the second
Item1_2, etc.
If Item1_2has sub elements, the first of those is called Item1_2_1, the second
Item1_2_2, etc.
The Item tree will look something like:
Item1 the first element of the first level
Item1_1 the first sub element of Item1
Item1_2 the second sub element of Item1
Item1_2_1 the first sub element of Item1_2
Item1_2_2 the second sub element of Item1_2
Item1_3 the third sub element of Item1
Item1_3_1 the first sub element of Item1_3
Item1_3_1_1 the first sub element of Item1_3_1
Item1_3_1_2 the second sub element of Item1_3_1
Item2 the second element of the first level
Item3 the third element of the first level
Item3_1 the first sub element of Item3
Item3_1_1 the first sub element of Item3_1
Item3_2 the third sub element of Item3
There can be as much elements and sublevels as you need.
The order nor the layout of the Item tree is important. You could also build a tree like this:
Item1_3_1_2
Item3
Item1
Item2
Item1_3_1_1
Item1_1
Item3_1_1
Item1_2
Item1_2_1
Item1_2_2
Item1_3
Item1_3_1
Item3_1
Item3_2
The variables of the Item tree
ItemX=new Array(Text to show, Link, BgImage, NoOfSubs,
Height, Width,BgColor,BgHiColor,FontColor,FontHiColor,BorderColor,
Destination link target frame, Group default,
Entity list disable, Entity disable,Category disable,
Period disable, Frequency disable);
For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"
- TextToShow
- Text string- What you want to show in the element. It can be text, an image or html
To show an image it must look like "<img src='MyImage'>"
To use roll over images use "rollover:MyImage1:MyImage2"
To leave this field blank use ""
- Link
- Text string- Where you want to go when you click the element.
Looks like "MyLink"
Can also be used to execute javascript statements. For instance when you want the link to open in the top window use "javascript:top.document.location.href='Link.htm';"
You can in fact start a whole script when the element is clicked with the help of javascript:. "javascript:{your script; another function;}"
- BgImage
- Text string- background image for the element. Is not supported for NS4 when the
Item is across frames.
I had to disable this for NS4 in frame setup because I could not get it to work properly. (Everybody who wants to try and find a solution for this is very welcom. Enable in
Item_com.js)
- NoOfSubs
- Number- The number of sub elements of this element in the next level.
- Height
- Number- The pixelheight of the element.
Must have a value for each element that ends with 1 (Item1, Item5_3_1) In all other elements this may be 0.
Elements in a vertical column may have different heights, all elements in a horizontal row get the height of the first element in that row
- Width
- Number- The pixelwidth of the element.
Must have a value for each element that ends with 1 (Item1, Item5_3_1) In all other elements this may be 0.
Elements in a horizontal row may have different widths, all elements in a vertical column get the width of the first element in that column
- BgColor
- Text string- Background color of this element when the mouse is not over the element.
When used it over rules the global variable LowBgColor
When not used it must be "".
Can be a supported color name like red or blue or a RGB string like #ff552a.
- BgHiColor
- Text string- Background color of this element when the mouse is over the element.
When used it over rules the global variable HighBgColor
When not used it must be "".
Can be a supported color name like red or blue or a RGB string like #ff552a.
- FontColor
- Text string- Font color of this element when the mouse is not over the element.
When used it over rules the global variable LowFontColor
When not used it must be "".
Can be a supported color name like red or blue or a RGB string like #ff552a.
- FontHiColor
- Text string- Font color of this element when the mouse is over the element.
When used it over rules the global variable HighFontColor
When not used it must be "".
Can be a supported color name like red or blue or a RGB string like #ff552a.
- BorderColor
- Text string- Border color of this group of elements.
Only the color of elements ending on 1 are used.
When used it over rules the global variable BorderColor
When not used it must be "".
Can be a supported color name like red or blue or a RGB string like #ff552a. -
-
- Destination Link
- Text string- Destination of link ("Main" for inline frame or
"Main_Alt" for a new window)
When not used it must be "". "" is the same as "Main". -
-
Group
- Text string- Valid group point of view of the link.
When not used it must be "". "" will ignore point of view bar. -
-
Entity List disable, Entity disable, Category disable, Period disable,
and Category Disable
- Text string- If set to "Y", then the equivalent drop down box
in the point of view will be disabled.
When not used it must be "". "" is the equivalent of "N"..