Results 1 to 2 of 2

Thread: AnyLink Multiple Columns Not Showing

  1. #1
    Join Date
    Mar 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Multiple Columns Not Showing

    1) Script Title: :: AnyLink JS Drop Down Menu v2.2

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    3) Describe problem: I'm a newbie, so bear with me. I did a basic drop-down menu on an image so when I roll over it, the image appears, and it works fine. But I tried following the instructions to divide into multiple columns and it still shows up in a single column. Here is the code in my menucontents.js file:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
    anylinkmenu1.items=[
    	["Dynamic Drive", "http://www.dynamicdrive.com/"],
    	["CSS Drive", "http://www.cssdrive.com/"],
    	["JavaScript Kit", "http://www.javascriptkit.com/", "efc"],
    	["Coding Forums", "http://www.codingforums.com/"],
    	["JavaScript Reference", "http://www.javascriptkit.com/jsref/"] //no comma following last entry!
    ]
    Here is my page, it is the "Teams" button in the menu: http://www.buxmonttorch.com/newmenusample.html

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    There are minor errors in your menucontents.js file that's the cause, specifically, the code in red:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
    anylinkmenu1.items=[
    	["Dynamic Drive", "http://www.dynamicdrive.com/"],
    	["CSS Drive", "http://www.cssdrive.com/"],
    	["JavaScript Kit", "http://www.javascriptkit.com/", "efc"],
    	["Coding Forums", "http://www.codingforums.com/"],
    	["JavaScript Reference", "http://www.javascriptkit.com/jsref/"] //no comma following last entry!
    ]
    
    
    
    var anylinkmenu2={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:'_new'} //Second menu variable. Same precaution.
    anylinkmenu2.items=[
    	["CNN", "http://www.cnn.com/"],
    	["MSNBC", "http://www.msnbc.com/"],
    	["Google", "http://www.google.com/"],
    	["BBC News", "http://news.bbc.co.uk"] //no comma following last entry!
    ]
    
    
    
    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"
    anylinkmenu3.items=[
    	["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!
    ]
    
    var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#DFFDF4', linktarget:'_new'} //Second menu variable. Same precaution.
    anylinkmenu4.items=[
    	["CNN", "http://www.cnn.com/"],
    	["MSNBC", "http://www.msnbc.com/"],
    	["Google", "http://www.google.com/"],
    	["BBC News", "http://news.bbc.co.uk"] //no comma following last entry!
    ]
    
    var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#DFFDF4', linktarget:'_self'} //Second menu variable. Same precaution.
    anylinkmenu5.cols={divclass:'column', inlinestyle:''} //menu.cols if defined creates columns of menu links segmented by keyword "efc"
    anylinkmenu5.items=[
    	["Mens Home", "http://www.cnn.com/"],
    	["Mens Roster", "http://www.msnbc.com/"],
    	["Mens Schedule", "http://www.google.com/", "efc"],
    	["Mens Standings", "http://news.bbc.co.uk"],
    	["Womens Home", "http://www.cnn.com/"],
    	["Womens Roster", "http://www.msnbc.com/", "efc"],
    	["Womens Schedule", "http://www.google.com/"],
    	["Womens Standings", "http://news.bbc.co.uk"]
    ]
    "anylinkmenu" should be "anylinkmenucols".
    DD Admin

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •