Man, wish I could read...

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
code-frog
Super Advanced
Super Advanced
Posts: 35
Joined: Sun Apr 25, 2004 9:47 pm
Location: Boise, Idaho
Contact:

Man, wish I could read...

Post by code-frog »

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 :roll:
Windows XP SP1a all updates, Toshiba Satellite Pro 1955-S805; 1 Gig Ram; 2.53 Gig Processor
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Man, wish I could read...

Post by John »

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... :D
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... :roll:
John
User avatar
code-frog
Super Advanced
Super Advanced
Posts: 35
Joined: Sun Apr 25, 2004 9:47 pm
Location: Boise, Idaho
Contact:

Post by code-frog »

2 Different styles? DUH!!!! 8)

Okay so I have a feeling that tip alone is going to go a LONG WAYS for me. THANKS!!! :D
Windows XP SP1a all updates, Toshiba Satellite Pro 1955-S805; 1 Gig Ram; 2.53 Gig Processor
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Here's a shortcut (taken from the tree menu data). An example main menu style...

Code: Select all

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;
}
Now, need a second style with only a few items changed? Why type it all over again...

Code: Select all

sub1Style = new copyOf(tstyle1)
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.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: Man, wish I could read...

Post by kevin3442 »

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... :roll:
Hey :!: Look here desert boy... are you picking on us fine midwesterners?

;)

Kevin
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Man, wish I could read...

Post by John »

kevin3442 wrote:
John wrote:Well, you could probably move to Nebraska... :roll:
Hey :!: Look here desert boy... are you picking on us fine midwesterners? ;)
Every chance I get, tornado fellow (said the ex-Ohio guy!)... :lol:
John
Post Reply