Results 1 to 3 of 3

Thread: links on drop down menu won't open in "_self" target mode

  1. #1
    Join Date
    May 2011
    Posts
    14
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default links on drop down menu won't open in "_self" target mode

    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:
    Hi there everybody. Iīm trying to get my txt links inside of this drop down menu to open the .html pages linked to them but in the same window and i canīt seem to do it right.

    I have reviewed the external file "menucontents.js" which controls the links and the instructions on the tutorial that explain the attribute " linktarget:" as well, but i can't seem to find the correct synthax for indicating the extrenal js file to open the linked pages in the _self target mode.

    My links point to simple .html pages contained in the same root folder that don't need to open in a new or _blank window.

    Is there a way out to this? Thnx a lot
    Last edited by jscheuer1; 08-19-2011 at 12:35 AM. Reason: fix broken link

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Get rid of the highlighted and change the red to _self:

    Code:
    var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'width:115px; background:#555555', linktarget:'_new'} //Second menu variable. Same precaution.
    anylinkmenu4.items=[
    	["Dermatolog&iacutea","dermatologia.html",target="_self/"],
    	["L&aacuteser", "http://www.msnbc.com/"],
    	["Botox", "http://www.google.com/"],
    	["&Aacutecido Hialur&oacutenico", "http://www.google.com/"],
    	["Medicina Est&eacutetica", "http://www.google.com/"],
    	["Infiltraciones", "http://www.google.com/"],
    	["Cosm&eacutetica", "http://news.bbc.co.uk"] //no comma following last entry!
    ]
    So you end up with:

    Code:
    var anylinkmenu4={divclass:'anylinkmenu', inlinestyle:'width:115px; background:#555555', linktarget:'_self'} //Second menu variable. Same precaution.
    anylinkmenu4.items=[
    	["Dermatolog&iacutea","dermatologia.html"],
    	["L&aacuteser", "http://www.msnbc.com/"],
    	["Botox", "http://www.google.com/"],
    	["&Aacutecido Hialur&oacutenico", "http://www.google.com/"],
    	["Medicina Est&eacutetica", "http://www.google.com/"],
    	["Infiltraciones", "http://www.google.com/"],
    	["Cosm&eacutetica", "http://news.bbc.co.uk"] //no comma following last entry!
    ]
    - 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:

    erguebitox (08-19-2011)

  4. #3
    Join Date
    May 2011
    Posts
    14
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Thumbs up

    Hi Jhon,

    Thank you so much! it works now perfect....problem solved

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
  •