View Full Version : Resolved AnyLink JS Drop Down Menu v2.2

01-04-2011, 11:13 PM
1) Script Title: AnyLink JS Drop Down Menu v2.2

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

- and - http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm

3) Describe problem: Not a problem, but...I am new here, so forgive me if you already answered this and I am not a HTML developer, I mustly workin C# and C. Is there a way to combine these. For the JS Drop Down Menu, I would love to "catagories" drop downs similiar the the "Demo 4" of "http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm", however, using the "single" definition as found in menucontent.js? Basically, I have tons of HTML pages and I add new ones and remove old ones all the time, so I definitely do not want to define the menu options on every page hence, I truly love the "AnyLink JS Drop Down Menu v2.2" approach, just I need to categories the drop-downs to make it cleaner and easier to navigate. :)

01-05-2011, 07:31 AM
Sure, try the below modified .js file, which lets you define a category text that is shown on the top of each column within a drop down menu, such as in the screen shot below:


To define category text for a drop down menu, inside menucontents.js, add the line in red below to the corresponding menu contents:

var anylinkmenu3={divclass:'anylinkmenucols', inlinestyle:'', linktarget:'secwin'} //Third menu variable. Same precaution.
anylinkmenu3.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
["Dynamic Drive", "http://www.dynamicdrive.com/"],
["CSS Drive", "http://www.cssdrive.com/"],
["JavaScript Kit", "http://www.javascriptkit.com/"],
["Coding Forums", "http://www.codingforums.com/"],
["JavaScript Reference", "http://www.javascriptkit.com/jsref/", "efc"],
["CNN", "http://www.cnn.com/"],
["MSNBC", "http://www.msnbc.com/"],
["Google", "http://www.google.com/"],
["BBC News", "http://news.bbc.co.uk", "efc"],
["News.com", "http://www.news.com/"],
["SlashDot", "http://www.slashdot.com/"],
["Digg", "http://www.digg.com/"],
["Tech Crunch", "http://techcrunch.com"] //no comma following last entry!
anylinkmenu3.categories=["Webmaster", "Search", "News"]

Here I'm extending anylinkmenu3 with a new categories property. Since this menu has 3 columns, I define 3 category text.

01-05-2011, 06:23 PM
Excellent, I will try once I get home. :)

01-07-2011, 04:01 AM
Great news, I figured it out. LOL, I looked at what you did and then duplicated it for the button as well. I am so happy. Thanks a million. I have told a number of my collegues about this site, it is excellent. Here is a pic of what I did:


How do we mark this post "Resolved"?

01-08-2011, 05:58 AM

01-08-2011, 06:32 AM
How do we mark this post "Resolved"?

I took care of it on this one. But to do it yourself, if you're the thread starter, you go to your first post in the thread and click the edit button for it, go advanced if you don't already have the advanced editor, and use the drop down to make it "Resolved".