PDA

View Full Version : links on drop down menu won't open in "_self" target mode



erguebitox
08-19-2011, 12:09 AM
1) Script Title: AnyLink JS Drop Down Menu v2.2


2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.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 :D

jscheuer1
08-19-2011, 12:44 AM
Get rid of the highlighted and change the red to _self:


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:


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!
]

erguebitox
08-19-2011, 03:30 AM
Hi Jhon,

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