Results 1 to 2 of 2

Thread: AnyLink JS Drop Down Menu v2.2

  1. #1
    Join Date
    May 2010
    Posts
    10
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default AnyLink JS Drop Down Menu v2.2

    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:

    In the above script, I am trying to edit the submenu that drops-down with individual targets for each link.

    for instance, in the following block, i want the .php file to open in the parent window but the other 3 .pdfs to open in a separate tab/window. some help would be much appreciated.

    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#DFFDF4', linktarget:'_parent'} //Second menu variable. Same precaution.
    anylinkmenu1.items=[
    	["Why Cleanse?", "why.php"],
    	["Allergens Table", "forms/allergens_table.pdf"],
    	["Product Ingredients", "forms/ingredients.pdf"],
    	["Medical study", "forms/med_study.pdf"]
    ]

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

    Default

    Sure, try the below modified .js file, which lets you specify a link target for each link within a drop down menu individually. With the modified script, inside your menu contents code, make use of the 4th parameter of each link to specify a link target:
    Code:
    var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#DFFDF4', linktarget:'_parent'} //Second menu variable. Same precaution.
    anylinkmenu1.items=[
    	["Why Cleanse?", "why.php"],
    	["Allergens Table", "forms/allergens_table.pdf", "", "_new"],
    	["Product Ingredients", "forms/ingredients.pdf", "", "mytarget"],
    	["Medical study", "forms/med_study.pdf"]
    Here the 2nd link will open in a new window, and the 3rd link will open in the window with target "mytarget".
    DD Admin

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

    BuildMyWeb (05-11-2010)

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
  •