open website in new window

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

open website in new window

Post by hercomserv »

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!
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

target
35
The target property allows you to declare a menu item link destination Values: new, blank Example: target='blank';
http://milonic.com/itemproperties.php

I don't think there should be quotes.
target=new;

maz
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

Post by hercomserv »

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!
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Post by rudy »

Try this:

Code: Select all

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.
oops, sorry Maz...didn't see your post :oops: Didn't mean to step on toes.
Last edited by rudy on Fri Sep 24, 2004 10:20 pm, edited 1 time in total.
Rudy
User avatar
stephen702
Super Advanced
Super Advanced
Posts: 77
Joined: Wed Jul 16, 2003 4:53 am
Location: Davis, CA
Contact:

Post by stephen702 »

This works for me:

target=_new;
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Thanks,

I guess the instructions were off. :roll:
It still works the old way.

maz
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

Post by hercomserv »

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!
_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();
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Post by rudy »

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;");
Rudy
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

Post by hercomserv »

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!
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Post by rudy »

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...
Rudy
User avatar
stephen702
Super Advanced
Super Advanced
Posts: 77
Joined: Wed Jul 16, 2003 4:53 am
Location: Davis, CA
Contact:

Post by stephen702 »

Here's an example that works on our menu:

aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;t ... ind-a-Play;");
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

aI("text=World Hope International;url=http://www.worldhope.org/;target='new';"); 
Kevin
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

Post by hercomserv »

Here's an example that works on our menu:

aI("text=Find-a-Play;url=http://www.playscripts.com/findaplay/;t ... ind-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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Please provide a URL so we can see your exact setup. As Kevin mentioned, the suggestions by the other folks here should work.
John
hercomserv
Beginner
Beginner
Posts: 9
Joined: Wed Nov 12, 2003 2:37 pm

Post by hercomserv »

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!
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/;t ... ind-a-Play;");
}
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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 :!: :D

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... :)
John
blaine
Super Advanced
Super Advanced
Posts: 59
Joined: Mon Apr 05, 2004 11:29 pm

Post by blaine »

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.
LJC
Beginner
Beginner
Posts: 2
Joined: Thu Nov 18, 2004 5:55 pm

Post by LJC »

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: Select all

aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target_new;status-ADChat;");
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

LJC wrote:Ive tryed the following code but does not work, any ideas?

Code: Select all

aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target_new;status-ADChat;");
Yup. Try this...

Code: Select all

aI("text=AD Chat;url=http://www.ljclan.com/ADChat/;target=_new;status-ADChat;");
You left out the = .
John
Post Reply