using Target=_blank links with buildlistmenu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
earthmanweb
Beginner
Beginner
Posts: 7
Joined: Tue Jan 08, 2008 9:23 am

using Target=_blank links with buildlistmenu

Post by earthmanweb »

Is it possible to target in a new windows using list based menu? You will notice in the source code that many of the links in the UL of menu items have a target="_blank" attribute, but are continuing to open in the same window. I am using the ListMenu version...

My test site is here:

http://dev2.########.com/

here is my buildlistmenu.js contents:

Code: Select all

fixMozillaZIndex=false; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=170;
_subOffsetTop=2;
_subOffsetLeft=-2;
buildAfterLoad=true;

with(menuStyle=new mm_style()){
onclass="menuStyle";
offclass="menuStyle";
bordercolor="";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="12px";
fontstyle="normal";
headerbgcolor="";
headercolor="";
offbgcolor="";
offcolor="#FFFFFF";
onbgcolor="";
oncolor="#FF9";
padding=6;
pagebgcolor="";
pagecolor="#FF9";
separatorcolor="#CCCCCC";
separatorsize=1;
subimage="";
subimagepadding=2;
}

with(menuStyle2=new mm_style()){
onclass="menuStyle2";
offclass="menuStyle2";
bordercolor="";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="100%";
fontstyle="normal";
headerbgcolor="";
headercolor="#000000";
offbgcolor="";
offcolor="#000000";
onbgcolor="";
oncolor="#EF7B0F";
padding=4;
pagebgcolor="";
pagecolor="";
separatorcolor="#CCCCCC";
separatorsize=1;
subimage="templates/includes/milonic/arrow.gif";
subimagepadding=2;

}

with(menuStyle3=new mm_style()){
onclass="menuStyle3";
offclass="menuStyle3";
bordercolor="";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="100%";
fontstyle="normal";
headerbgcolor="";
headercolor="#000000";
offbgcolor="";
offcolor="#000000";
onbgcolor="";
oncolor="#EF7B0F";
padding=4;
pagebgcolor="";
pagecolor="black";
separatorcolor="#CCCCCC";
separatorsize=1;
subimage="templates/includes/milonic/arrow.gif";
subimagepadding=2;
}

with(menuStyle4=new mm_style()){
onclass="menuStyle3";
offclass="menuStyle3";
bordercolor="";
borderstyle="";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="100%";
fontstyle="normal";
headerbgcolor="";
headercolor="#000000";
offbgcolor="";
offcolor="#000000";
onbgcolor="";
oncolor="#EF7B0F";
padding=4;
pagebgcolor="";
pagecolor="black";
separatorcolor="#CCCCCC";
separatorsize=1;
subimage="templates/includes/milonic/arrow.gif";
subimagepadding=2;
}


// syntax: buildListMenu("id of list", "menu style name", "main menu properties")
buildListMenu("milonicmenu1","menuStyle","alwaysvisible=true;orientation='horizontal';position='relative';");
Thanks!
Terran
Last edited by earthmanweb on Wed Jan 30, 2008 11:08 am, edited 1 time in total.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Re: using Target=_blank links with buildlistmenu

Post by Andy »

Hi,

Every email we send to bluemandala.com is bouncing with a "user not found" error, this is why you are not getting any email from us.

Anyway, I have changed the listmenus.js file and if you update your copy with the one from http://milonic.com/listmenus.js it should start using the target that you specify in the markup.

HTH,
Andy
earthmanweb
Beginner
Beginner
Posts: 7
Joined: Tue Jan 08, 2008 9:23 am

Re: using Target=_blank links with buildlistmenu

Post by earthmanweb »

Hi Andy,

Thanks, it must be the spam filter for some reason. My apologies too, i just realized that I registered it under my other email address info at earthman dot ca. Sorry for the confusion!


I will try what you say and let you know how it goes...

Terran
earthmanweb
Beginner
Beginner
Posts: 7
Joined: Tue Jan 08, 2008 9:23 am

Re: using Target=_blank links with buildlistmenu

Post by earthmanweb »

Worked perfectly with the new code you posted the link to, thank you!!!!!
Thoth
Beginner
Beginner
Posts: 9
Joined: Mon Feb 18, 2008 6:21 am

Re: using Target=_blank links with buildlistmenu

Post by Thoth »

How can this be implemented for use with the Mac style drop-down menu?
Thoth
Beginner
Beginner
Posts: 9
Joined: Mon Feb 18, 2008 6:21 am

Re: using Target=_blank links with buildlistmenu

Post by Thoth »

Nevermind my previous post... I got it to work by adjusting the bit of code that I'm most familiar with using. :D
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: using Target=_blank links with buildlistmenu

Post by Ruth »

Hi,

Could you post what you did so others might know how to do it?

Ruth
Thoth
Beginner
Beginner
Posts: 9
Joined: Mon Feb 18, 2008 6:21 am

Re: using Target=_blank links with buildlistmenu

Post by Thoth »

I just made sure I used this version of code:

target=_blank

I merely added that immediately after the link and before the last quotes with no spaces in between. If it's not precisely like that, it won't work in all browsers.

aI("separatorsize=1;text=YOUR LINK DISPLAY TEXT;url=HTTP://WWW.YOUR OFFSITE LINK GOES HERE.COM;target=_blank");
Post Reply