Results 1 to 8 of 8

Thread: AnyLink JS Drop Down Menu v2.2 new window only working

  1. #1
    Join Date
    Jun 2006
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default AnyLink JS Drop Down Menu v2.2 new window only working

    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: The menu only works by launching new windows for each link clicked. I know you are suppose to change the code from the linktarget:'_new' to linktarget:'' but it doesn't work it breaks the links. I even tried "_self" and "self" and those just break the links. It only works opening a new window. Any ideas?

    var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'width:135px; background:#ced9e2', linktarget:'_new'}

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    try this one:

    Code:
    linktarget:'_blank'
    _____________________

    David Demetrius // davejob
    _____________________

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

    Default

    If I understand the OP correctly, you don't want the links to open in any kind of new or secondary window right, just in the current? linktarget:'' should work in doing that. Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  4. #4
    Join Date
    Jun 2006
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Yes that is correct, I want all drop down links to target the current window and no secondary windows. When I leave it as linktarget:'sewin' or 'new' the menu works but when I change it to linktarget:'' the link is broken.

    You can see what I have here:
    http://www.cviscusi.com/UnlockingPotential/index.html

    Thanks very much for taking a look!

  5. #5
    Join Date
    Jun 2006
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks but linktarget:'_blank' still opens it in a new window.

    Any other ideas?

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Do not add _blank.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Jun 2006
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I guess my response didn't go through but removing the _blank doesn't help. The menu only works when _secwin or _new is there. Left with just '' shows a broken link.


    Any other ideas?

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

    Default

    By looking at your page, as far as I can tell the script is working fully actually. The menu links do open in the same window as the menu itself. The reason why they are broken links then is simply due to the way you've defined their URLs inside menucontents.js. Take the first drop down menu for example, which draws from the following chunk of code:

    Code:
    var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'width:225px; background:#ced9e2', linktarget:''} //Second menu variable. Same precaution.
    anylinkmenu4.items=[
    	["Achievement Gap", "achievementgap.html/"],
    	["School Turnaround Nationally", "stnationally.html/"],
    	["School Turnaround in Massachusetts", "stma.html/"],
    	["School Turnaround in the News", "stnews.html/"] //no comma following last entry!
    ]
    The first link "achievementgap.html/" when fully constructed translates to http://www.cviscusi.com/UnlockingPot...ementgap.html/, which is a broken link. You should take out the trailing "/" in all of your links inside menucontents.js
    DD Admin

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

    teegirl13 (10-09-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
  •