Results 1 to 3 of 3

Thread: Anylink Menu Open Only Some Items in New Window

  1. #1
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    197
    Thanks
    43
    Thanked 1 Time in 1 Post

    Default Anylink Menu Open Only Some Items in New Window

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

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...m#.UkFz2BjD9dg

    3) Describe problem: I have the menu customized and installed on a test page (http://www.flimpact.org/amp/overviewabout.html) and it's working, but I would like to have some items open in a new window and others open in the same window. I did this before with a previous version of this menu thanks to John Scheuer's help, but don't how to change the anylink.js script so I can do this for version 2.3.

    Thanks,
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,957
    Thanks
    43
    Thanked 3,195 Times in 3,157 Posts
    Blog Entries
    12

    Default

    Use this version of the script (modified from your copy of it, right click and 'Save As'):

    anylinkmenu.js

    It will allow you to specify the target for individual items in the menucontents.js file:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.items=[
    
    	["Program Fact Sheet", "/amp/pdf/2013-AMPFactSheet.pdf"],
    	["Service Flow Chart", "/amp/index.html", "_blank"],
    	["Steps to Becoming a Provider", "/amp/index.html"],
    	["All FAQ's", "/amp/index.html"],
    	["Sample Menus", "/amp/index.html"],
    	["Sitemap", "/amp/index.html"] //no comma following last entry!
    ]
    You can still set the linktarget, like if you want all but one or two to open in a new tab:

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'', linktarget:'_blank'} //First menu variable. Make sure "anylinkmenu1" is a unique name!
    anylinkmenu1.items=[
    
    	["Program Fact Sheet", "/amp/pdf/2013-AMPFactSheet.pdf"],
    	["Service Flow Chart", "/amp/index.html"],
    	["Steps to Becoming a Provider", "/amp/index.html"],
    	["All FAQ's", "/amp/index.html", "_self"],
    	["Sample Menus", "/amp/index.html"],
    	["Sitemap", "/amp/index.html"] //no comma following last entry!
    ]
    In that scenario, all will open in a new tab, except the All FAQ's page, which will open in the same window.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    dmwhipp (09-25-2013)

  4. #3
    Join Date
    Sep 2004
    Location
    Tallahassee, FL USA
    Posts
    197
    Thanks
    43
    Thanked 1 Time in 1 Post

    Default

    Thanks so much for your help again John - working perfectly as usual!
    Deborah
    Deborah Whipp
    Web Designer
    Tallahassee, FL
    www.DWWebDesigns.com

Similar Threads

  1. Setting location where menu items open AnyLink JS Drop Down Menu v2.3
    By xboxdynasty in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 12-09-2011, 03:36 PM
  2. Open Certain Links in a New Window - AnyLink Menu
    By vlane95678 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 04-05-2011, 08:44 PM
  3. AnyLink JS Drop Down Menu v2.2, open URL in blank window?
    By mricklefs2 in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 12-17-2010, 09:22 PM
  4. AnyLink Drop Down Menu - only specific links to open in new window
    By techrn in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 05-11-2010, 07:47 PM
  5. AnyLink Vertical Menu (Open in New Window)
    By Jam3rai in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 10-17-2005, 06:28 PM

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
  •