Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:56
Man, wish I could read...
Poster: code-frog
Dated: Tuesday January 25 2005 - 18:10:17 GMT
So far I've asked two questions that could have been answered if I had read the FAQ first. DUH!!!
But this next one I'm not finding in the FAQ (written by Maz that I lamely asked if ... was still around).
Anyway, I've actually got a few that I'm going to tie in here.
The biggest... How do I make the font of top level menu bold or a different size or both while keeping the menu itself normal text.
I checked the FAQ but either I missed it, it's not supported or it's not covered in the FAQ.
Second, I saw in another post about bookmarks and make-homepage that people were using mm_Bookmark and mm_XXXYYY functions. Is this just convention or are there functions we can invoke that I'm too Idahoan to know about? If we have mm_ functions where's the master list of the API?
Now that I've asked this I'm going to go search for that answer and I bet I find it. If it's hard to find I'll feel better. If it's easy to find I'll feel Idahoan and know it's not time to move yet.
- Rex
Re: Man, wish I could read...
Poster: John
Dated: Tuesday January 25 2005 - 19:11:38 GMT
code-frog wrote:
So far I've asked two questions that could have been answered if I had read the FAQ first. DUH!!!
Umm - kinda why we put that stuff out there...
code-frog wrote:
The biggest... How do I make the font of top level menu bold or a different size or both while keeping the menu itself normal text.
How 'bout making 2 different styles, one for the main menu and another for the subs. Set your weight and size accordingly, then call the appropriate style as needed (main or sub).
code-frog wrote:
Second, I saw in another post about bookmarks and make-homepage that people were using mm_Bookmark and mm_XXXYYY functions. Is this just convention or are there functions we can invoke that I'm too Idahoan to know about? If we have mm_ functions where's the master list of the API?
I think most of those were actually written by Kevin. Use whatever you need.
code-frog wrote:
Now that I've asked this I'm going to go search for that answer and I bet I find it. If it's hard to find I'll feel better. If it's easy to find I'll feel Idahoan and know it's not time to move yet.
Well, you could probably move to Nebraska...
Poster: code-frog
Dated: Tuesday January 25 2005 - 19:16:40 GMT
2 Different styles? DUH!!!!
Okay so I have a feeling that tip alone is going to go a LONG WAYS for me. THANKS!!!
Poster: John
Dated: Tuesday January 25 2005 - 20:07:23 GMT
Here's a shortcut (taken from the tree menu data). An example main menu style...
Code:
with(tstyle1 = new mm_style()){
offcolor = "#ffffff";
offbgcolor = "#888888";
oncolor = "#000000";
onbgcolor = "#ffcc00";
headerbgcolor = "#990033";
subimage = "/sa/menu5/images/white_arrow.gif";
onsubimage = "/sa/menu5/images/black_arrow_down.gif";
padding = 5;
fontsize = "9px";
fontweight = "bold";
fontfamily = "Tahoma, Verdana, Arial, sans-serif";
subimageposition = "middle;right";
separatorsize = 1;
separatorcolor = "#ffcc00";
subimagepadding = 2;
imagepadding = 2;
itemwidth = 155;
}
offcolor = "#ffffff";
offbgcolor = "#888888";
oncolor = "#000000";
onbgcolor = "#ffcc00";
headerbgcolor = "#990033";
subimage = "/sa/menu5/images/white_arrow.gif";
onsubimage = "/sa/menu5/images/black_arrow_down.gif";
padding = 5;
fontsize = "9px";
fontweight = "bold";
fontfamily = "Tahoma, Verdana, Arial, sans-serif";
subimageposition = "middle;right";
separatorsize = 1;
separatorcolor = "#ffcc00";
subimagepadding = 2;
imagepadding = 2;
itemwidth = 155;
}
Now, need a second style with only a few items changed? Why type it all over again...
Code:
sub1Style = new copyOf(tstyle1)
sub1Style.offcolor = "#000000";
sub1Style.offbgcolor = "#efedde";
sub1Style.separatorcolor = "#556E8C";
sub1Style.visitedcolor = "#0055ff";
sub1Style.headercolor = "#ffffff";
sub1Style.offcolor = "#000000";
sub1Style.offbgcolor = "#efedde";
sub1Style.separatorcolor = "#556E8C";
sub1Style.visitedcolor = "#0055ff";
sub1Style.headercolor = "#ffffff";
The second block of code copies the main code and changes only those items listed. Note that you can have as many of these as you need.
Re: Man, wish I could read...
Poster: kevin3442
Dated: Tuesday January 25 2005 - 20:33:51 GMT
Hi Rex,
John wrote:
code-frog wrote:
Second, I saw in another post about bookmarks and make-homepage that people were using mm_Bookmark and mm_XXXYYY functions. Is this just convention or are there functions we can invoke that I'm too Idahoan to know about? If we have mm_ functions where's the master list of the API?
I think most of those were actually written by Kevin. Use whatever you need.
John's right (I think). I've written a variety of little functions to help people do things that might be a little out of the ordinary. When I post code for other people to use to modify the behavior of their menus, I usually prefix function names and global variable names with "mm_". I do that to reduce the chance of my function and global names interfering with names that people may already be using in other js code on their pages.
The menu system does offer a variety of built-in methods (many of which I have used in my mm_ functions). You'll find a description of these built-in methds here. These are indespensible if you want to start writing code to extend the functionality of your menus.
John wrote:
Well, you could probably move to Nebraska...
Hey Look here desert boy... are you picking on us fine midwesterners?
Kevin
Re: Man, wish I could read...
Poster: John
Dated: Tuesday January 25 2005 - 21:05:08 GMT
kevin3442 wrote:
John wrote:
Well, you could probably move to Nebraska...
Hey Look here desert boy... are you picking on us fine midwesterners?
Every chance I get, tornado fellow (said the ex-Ohio guy!)...