Results 1 to 8 of 8

Thread: Anylink Menu - _new

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

    Default Anylink Menu - _new

    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 would like to have one of the links in the menu contents to load in the same page, and the other link to load in a new tab. Any suggestions on how to do this?

  2. #2
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    If I am understanding correctly, all you need to do is define the first link normally, and the second one to open in a new page. For example:

    Code:
    var menu1=new Array()
    menu1[0]='<a href="/php/about-us.php">About Us</a>'
    menu1[1]='<a href="http://www.dynamicdrive.com" target="_blank">Best Scripts</a>'
    Last edited by kuau; 07-30-2010 at 06:27 PM. Reason: sp

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well, how would that apply to the code from this script?

    HTML Code:
    var link1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
    link1.items=[
    	["Go to Website", "http://www.link1url.com"],
    	["View the Flyer", "../link1folder/link1.html"]
    ]

  4. #4
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    Seems I am using an older version of the same script. Not sure if this would work... I've enclosed the first link in single quotes in order to add the new page part.

    Code:
    var link1={divclass:'anylinkmenu', inlinestyle:'', linktarget:''}
    link1.items=[
    	["Go to Website", '"http://www.link1url.com" target="_blank"'],
    	["View the Flyer", "../link1folder/link1.html"]
    ]
    I just took a look at the new version. Now I remember trying it when it came out. Although it has many cool new features, I found it overkill for my needs. I really like the original version.
    Last edited by kuau; 07-30-2010 at 07:00 PM. Reason: Added info

  5. #5
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for posting your solution. I've tried it, too, but rather than opening the link to another site in a new window, it opens the same page the link appears on in a new window. Any idea why this might be, please? Here's the code:

    Code:
    anylinkmenu.items=[
    	["CAO Office", "departments-cao-office.php"],
    	["Castle Kilbride", '"http://www.castlekilbride.ca" target="_new"']
     //no comma following last entry!
    ]
    Thanks!

  6. #6
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    Try changing the target="_new" to target="_blank"

  7. #7
    Join Date
    Sep 2010
    Location
    Hi Stalker.
    Posts
    148
    Thanks
    16
    Thanked 3 Times in 3 Posts

    Default

    Quote Originally Posted by kuau View Post
    Try changing the target="_new" to target="_blank"
    You beat me to it ;P
    Daba! The Fantage-like website
    Virtual World in progress.
    Out of pure HTML, Javascript, and CSS. Oh, and poorly done Paint images.

  8. #8
    Join Date
    Sep 2007
    Location
    Maui
    Posts
    642
    Thanks
    284
    Thanked 15 Times in 15 Posts

    Default

    Ha ha... you have to be fast around here!

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
  •