Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:08
open website in new window
Poster: hercomserv
Dated: Friday September 24 2004 - 19:13:50 BST
How can I have one or more menu items open a website in a new window (traget frame - new window)?
Have looked around but can not find anything .... thanks for your help!
Poster: Maz
Dated: Friday September 24 2004 - 20:09:08 BST
Quote:
target
35
The target property allows you to declare a menu item link destination Values: new, blank Example: target='blank';
35
The target property allows you to declare a menu item link destination Values: new, blank Example: target='blank';
http://www.milonic.com/itemproperties.php
I don't think there should be quotes.
target=new;
maz
Poster: hercomserv
Dated: Friday September 24 2004 - 20:28:01 BST
aI("text=World Hope International;url=http://www.worldhope.org;target=new;");
I tried traget=new with and w/o quotes ... what else am I doing wrong? Thank you for your helo!
Poster: Maz
Dated: Friday September 24 2004 - 22:10:43 BST
Sorry I don't have it set to test.
Try the old way.
target=_blank;
I see a thread where it was used, maybe it still does.
maz
Poster: rudy
Dated: Friday September 24 2004 - 22:16:51 BST
Try this:
Code:
aI("text=some text goes here;url=http://www.whatEver.com/theFileName.htm;target=_blank;targetfeatures=scrollbars=yes;status=put text here, it will show up on the task bar;");
Change targetfeatures=scrollbars=yes to scrollbars=no, if you don't want scroll bars. Remove the status=and text if you want, its only an option.
Change targetfeatures=scrollbars=yes to scrollbars=no, if you don't want scroll bars. Remove the status=and text if you want, its only an option.
oops, sorry Maz...didn't see your post Didn't mean to step on toes.
Poster: Maz
Dated: Friday September 24 2004 - 22:25:45 BST
Thanks,
I guess the instructions were off.
It still works the old way.
maz
Poster: hercomserv
Dated: Friday September 24 2004 - 22:45:42 BST
Still does not work???? aI("text=some text goes here;url=http://www.worldhope.org;target=_blank;");
Please help ... I am pretty new to all this.
Thanks!
Quote:
_menuCloseDelay=500 // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(menuStyle=new mm_style()){
onbgcolor="#702719";
oncolor="#FFFFFF";
offbgcolor="#F7F2DF";
offcolor="#702719";
bordercolor="#B6A37E";
borderstyle="solid";
borderwidth=1;
separatorcolor="#B6A37E";
separatorsize="1";
padding=4;
fontsize="65%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="FFFFFF";
pagebgcolor="#CDC39D";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#000000', Direction=135, Strength=0)";
outfilter="randomdissolve(duration=0.3)";
}
with(milonic=new menuname("About")){
style=menuStyle;
overflow="scroll";
aI("text=Mission & Purpose;url=purpose.htm;");
aI("text=Beliefs & Core Values;url=beliefs.htm;");
aI("text=Church History;url=history.htm;");
aI("text=Staff;url=staff.htm;");
aI("text=Location;url=location.htm;");
}
with(milonic=new menuname("Ministries")){
style=menuStyle;
overflow="scroll";
aI("text=Worship;url=worship.htm;");
aI("text=Men's Ministry;url=men.htm;");
aI("text=Women's Ministry;url=women.htm;");
aI("text=Children's Church;url=children.htm;");
aI("text=Wednesday Night;url=wednesday.htm;");
aI("text=Middle School;url=middle.htm;");
aI("text=High School;url=high.htm;");
aI("text=Sunday School;url=sunday.htm;");
aI("text=Adult Bible Fellowship;url=adult.htm;");
aI("text=Small Group Ministry;url=smallgroup.htm;");
}
with(milonic=new menuname("News & Events")){
style=menuStyle;
aI("text=Church Calendar;url=calendar.htm;");
aI("text=Monthly Newsletter;url=newsletter.htm;");
}
with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Wesleyan Denomination;url=http://www.wesleyan.org;");
aI("text=Wisconsin District;url=http://www.wiwesleyan.org;");
aI("text=Wesleyan Publishing House;url=http://www.wesleyan.org/wph;");
aI("text=World Hope International;url=http://www.worldhope.org;target=_new;");
aI("text=some text goes here;url=http://www.worldhope.org;target=_blank;");
}
with(milonic=new menuname("Contact Us")){
style=menuStyle;
aI("text=Basic Info;url=basic.htm;");
aI("text=Email addresses;url=email.htm;");
}
drawMenus();
_menuOpenDelay=150 // The time delay before menus open on mouse over
_followSpeed=5 // Follow scrolling speed
_followRate=50 // Follow scrolling Rate
_subOffsetTop=5 // Sub menu top offset
_subOffsetLeft=-10 // Sub menu left offset
_scrollAmount=3 // Only needed for Netscape 4.x
_scrollDelay=20 // Only needed for Netcsape 4.x
with(menuStyle=new mm_style()){
onbgcolor="#702719";
oncolor="#FFFFFF";
offbgcolor="#F7F2DF";
offcolor="#702719";
bordercolor="#B6A37E";
borderstyle="solid";
borderwidth=1;
separatorcolor="#B6A37E";
separatorsize="1";
padding=4;
fontsize="65%";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
pagecolor="FFFFFF";
pagebgcolor="#CDC39D";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#000000', Direction=135, Strength=0)";
outfilter="randomdissolve(duration=0.3)";
}
with(milonic=new menuname("About")){
style=menuStyle;
overflow="scroll";
aI("text=Mission & Purpose;url=purpose.htm;");
aI("text=Beliefs & Core Values;url=beliefs.htm;");
aI("text=Church History;url=history.htm;");
aI("text=Staff;url=staff.htm;");
aI("text=Location;url=location.htm;");
}
with(milonic=new menuname("Ministries")){
style=menuStyle;
overflow="scroll";
aI("text=Worship;url=worship.htm;");
aI("text=Men's Ministry;url=men.htm;");
aI("text=Women's Ministry;url=women.htm;");
aI("text=Children's Church;url=children.htm;");
aI("text=Wednesday Night;url=wednesday.htm;");
aI("text=Middle School;url=middle.htm;");
aI("text=High School;url=high.htm;");
aI("text=Sunday School;url=sunday.htm;");
aI("text=Adult Bible Fellowship;url=adult.htm;");
aI("text=Small Group Ministry;url=smallgroup.htm;");
}
with(milonic=new menuname("News & Events")){
style=menuStyle;
aI("text=Church Calendar;url=calendar.htm;");
aI("text=Monthly Newsletter;url=newsletter.htm;");
}
with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Wesleyan Denomination;url=http://www.wesleyan.org;");
aI("text=Wisconsin District;url=http://www.wiwesleyan.org;");
aI("text=Wesleyan Publishing House;url=http://www.wesleyan.org/wph;");
aI("text=World Hope International;url=http://www.worldhope.org;target=_new;");
aI("text=some text goes here;url=http://www.worldhope.org;target=_blank;");
}
with(milonic=new menuname("Contact Us")){
style=menuStyle;
aI("text=Basic Info;url=basic.htm;");
aI("text=Email addresses;url=email.htm;");
}
drawMenus();
Poster: rudy
Dated: Friday September 24 2004 - 22:53:35 BST
Don't you want to put in a file name? like http://wwwlworldhope.org/filename.htm;target=_blank
If not, I think you need a forward slash after .org
When no file name follows your web hosts name use a forward slash.
Still does not work???? aI("text=some text goes here;url=http://www.worldhope.org;target=_blank;");
Poster: hercomserv
Dated: Saturday September 25 2004 - 0:01:27 BST
what I want to do is to open a new browser window with an external website. like yahoo or google. - But I would like to keep the original website window open too. Right now it opens the external website in the existing window - not in a new window.
Anything else wrong in that file? I have version 5.
Thank you for your help!
Poster: rudy
Dated: Saturday September 25 2004 - 0:46:02 BST
Are you using target=_blank? If not try it, it should open a new window and still keep the orginal window open.
For example, as I am look at this Milonc forum in a window, and then click on the link I gave you in my last posting (even thought there is nothing on it-ficticious address) , it opens a new window, but the Milonic forum window is still open under it.
I may still may not be understanding what you want to do...
Poster: stephen702
Dated: Saturday September 25 2004 - 0:58:29 BST
Here's an example that works on our menu:
aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;target=_new;status=Find-a-Play;");
Poster: kevin3442
Dated: Saturday September 25 2004 - 1:21:02 BST
hercomserv,
What version of Milonic are you using? You'll find a version number of you open milonic_src.js an check the comments at the top.
Any of the methods mentioned by the others should work. You could try enclosing the target setting in single quotes, as shown in the original sample and below:
Code:
aI("text=World Hope International;url=http://www.worldhope.org/;target='new';");
Kevin
Poster: hercomserv
Dated: Saturday September 25 2004 - 15:16:28 BST
Quote:
Here's an example that works on our menu:
aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;target=_new;status=Find-a-Play;");
aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;target=_new;status=Find-a-Play;");
Added exactly the above line. When I click on the item "Find-a-Play" it does not open the new site in a new window. It replaces the current window.
I just upgraded to the newest version 5.48 by replacing the three .js files
Poster: John
Dated: Saturday September 25 2004 - 16:49:12 BST
Please provide a URL so we can see your exact setup. As Kevin mentioned, the suggestions by the other folks here should work.
Poster: hercomserv
Dated: Saturday September 25 2004 - 17:51:45 BST
url is http://www.sandlakewesleyan.org/preview the last menu option - Links - has the below code ... so most of them should open the linked websirte in a new window.
Thanks again for your help!
Quote:
with(milonic=new menuname("Links")){
style=menuStyle;
aI("text=Wesleyan Denomination;url=http://www.wesleyan.org;");
aI("text=Wisconsin District;url=http://www.wiwesleyan.org;traget=blank;");
aI("text=Wesleyan Publishing House;url=http://www.wesleyan.org/wph;traget=new;");
aI("text=World Hope International;url=http://www.worldhope.org;target=_new;");
aI("text=some text goes here;url=http://www.worldhope.org/;target=_blank;");
aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;target=_new;status=Find-a-Play;");
}
style=menuStyle;
aI("text=Wesleyan Denomination;url=http://www.wesleyan.org;");
aI("text=Wisconsin District;url=http://www.wiwesleyan.org;traget=blank;");
aI("text=Wesleyan Publishing House;url=http://www.wesleyan.org/wph;traget=new;");
aI("text=World Hope International;url=http://www.worldhope.org;target=_new;");
aI("text=some text goes here;url=http://www.worldhope.org/;target=_blank;");
aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;target=_new;status=Find-a-Play;");
}
Poster: John
Dated: Saturday September 25 2004 - 21:06:20 BST
The first three items do not open a new window, while the last three do...
Line 1. You didn't ask for a new window here.
Lines 2 & 3. Maybe it's just me, but I suspect the system does not know what "traget=_new" is
Line 4. This works, given that "traget" is now "target"!
Lines 5-6. These are not recognizing the url for some reason (the hand changes to a text cursor), and the menu closes immediately.
target=_new; is correct.
Sorry - got a headache. Had to pick on somebody...
Poster: blaine
Dated: Sunday October 31 2004 - 17:41:47 GMT
Also make sure you don't have a pop-up blocker enabled. I thought mine was disabled but it was still preventing the new window from appearing. Worked fine in Firefox.
After allowing the host in IE 6 SP2, the target=_new; worked.
Poster: LJC
Dated: Thursday November 18 2004 - 17:03:43 GMT
Im having the same problem here.
I want the "AD Chat" link from here, to open in a new window.
Ive tryed the following code but does not work, any ideas?
Code:
aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target_new;status-ADChat;");
Poster: John
Dated: Thursday November 18 2004 - 17:25:20 GMT
LJC wrote:
Ive tryed the following code but does not work, any ideas?
Code:
aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target_new;status-ADChat;");
Yup. Try this...
Code:
aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target=_new;status-ADChat;");
You left out the = .
Poster: Andy W
Dated: Tuesday December 14 2004 - 3:43:19 GMT
Hi,
target=_new or target=_blank do not work for me correctly in Netscape Navigator 4.8. The page appears, but it does not open in a new window. I have the same need (page in new window), but also require backwards compatability. (Using Milonic Version 5.52).
Yet, without Milonic, <a target=_blank href="[page URL]"></a> does open the page in a new window in NN 4.8
So what is the cross-browser safe Milonic solution?
Andy W
Poster: Ruth
Dated: Tuesday December 14 2004 - 4:32:45 GMT
I am getting a new window when I try LJC's AD CHAT link in NN4.79, however, it's opening a new window with nothing in it, while loading the linked page in the original window. Weird.
Ruth
Poster: Andy W
Dated: Tuesday December 14 2004 - 4:43:11 GMT
We're revising a portion of our web site so have nothing in the public domain we can show right now.
Here's what did not work properly in NN 4.8:
aI("title=Test current app as it looks to responders;text=Test App;url=[our URL];target=_blank;");
nor did this:
aI("title=Test current app as it looks to responders;text=Test App;url=[our URL];target=_new;");
Here's how we got around the problem.
aI("title=Test current app as it looks to responders;text=Test App;url=javascript:Open_Wide_Window('[our URL]');");
where we implemented the Open_Wide_Window JS function as follows:
function Open_Wide_Window(URLName) {
window.open(URLName,"help","height=500,width=650,toolbar=yes,menubar=yes,resizable=yes,status=no,left=25,top=25,alwaysRaised=yes,scrollbars=yes")
}
Thanks. Would like to be able to use the target= command instead, but oh well.