[thelist] inserting value into JS array

aardvark roselli at earthlink.net
Fri Feb 1 12:30:00 CST 2002


ok, thanks to Liorean's help, i've got a lovely function now where i
test to see if the user is on a Mac and then set a variable
accordingly:

if (IsMac() == true) {
	topOffset = 0
}
else	{
	topOffset = 15
}

but how do i insert 'topOffset' into an array like this (some of you
should recognize this) and get it to accept it?  it's not offsetting the
DHTML menu for Mac users, but it's not throwing an error (and i did
test the Mac test and the number assignment)...

HM_Array2 = [
[100,		// menu width
130,		// left_position
topOffset,			// top_position
"#000000",      // font_color
"#ffffff",   // mouseover_font_color
// "#6699CC",   // background_color
"#999999",   // background_color
"#336699",    // mouseover_background_color
"#000000",     // border_color
"#000000",    // separator_color
1,			// top_is_permanent
1,          // top_is_horizontal
0,          // tree_is_horizontal
1,          // position_under
0,          // top_more_images_visible
1,          // tree_more_images_visible
"null",     // evaluate_upon_tree_show
"null",     // evaluate_upon_tree_hide
],          //right-to-left
["Departments","/document_391.html",1,0,1],
......snip......
]

(i can hear you all laughing at my JS 5k1llz)




More information about the thelist mailing list