View Full Version : AnyLink JS Drop Down Menu v2.2, open URL in blank window?

12-15-2010, 07:03 PM
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: Is there a way to make just certain links in a menu open in a new browser window? The URL is http://midiowagrowth.com/new/

12-15-2010, 07:10 PM
Find the links you want to open in new windows / tabs and use the following:

<a href="linkhere.html" target="_blank">Link</a>

target="_blank" is the bit to pay attention to, that will tell the browser to open that link in a new window or tab.

12-15-2010, 07:14 PM
Thanks, but this is the format you have to post links in the script.

["Dynamic Drive", "http://www.dynamicdrive.com/"],

Any ideas?

12-15-2010, 09:04 PM
There's probably a better way of doing it, but here's a quick fix, find this line in anylinkmenu.js:

frag+='<li><a href="' + menuobj.items[i][1] + '" target="' + menuobj.linktarget + '">' + menuobj.items[i][0] + '</a></li>\n'

and replace with:

frag+='<li><a href="' + menuobj.items[i][1] + '" target="_blank">' + menuobj.items[i][0] + '</a></li>\n'

12-17-2010, 10:22 PM
Will this make all the menu items open in a new window? I only want a few items in each menu to open in a new window..