Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 5 votes, 2.40 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-24-2003, 05:31 AM   PM User | #1
Mr.Furious
New to the CF scene

 
Join Date: Jan 2003
Location: Los Angeles, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Mr.Furious is an unknown quantity at this point
Setting a link to open a new window

can some one please tell me what the code looks like to make a web page link open a new window to another web page.
Mr.Furious is offline   Reply With Quote
Old 01-24-2003, 06:08 AM   PM User | #2
Feyd
Regular Coder


 
Feyd's Avatar
 
Join Date: May 2002
Location: Los Angeles, CA Maxim: Subvert Society
Posts: 404
Thanks: 0
Thanked 0 Times in 0 Posts
Feyd is an unknown quantity at this point
<a href="link/to/window" target="_top">link text</a>
__________________
Moderator, Perl/CGI Forum
shadowstorm.net - subvert society
Feyd is offline   Reply With Quote
Old 01-24-2003, 06:51 AM   PM User | #3
Mr.Furious
New to the CF scene

 
Join Date: Jan 2003
Location: Los Angeles, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Mr.Furious is an unknown quantity at this point
the font of the text doesn't show up. what am i doing wrong?

sample of my code: <a href="http://www.hostboard.com/cgi-bin/ultimatebb.cgi?ubb=forum&f=4190"target="><font face="Helvetica" size="-1"><span style="font-size:12">Message Baords</span></font></a>
Mr.Furious is offline   Reply With Quote
Old 01-24-2003, 08:01 AM   PM User | #4
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Spaces...

Try inserting some spaces to separate the different attributes, your target isn't set, and why do you use both the (deprecated) font element and an inline style? Try:
Code:
<a href="http://www.hostboard.com/cgi-bin/ultimatebb.cgi?ubb=forum&f=4190"
   target="_blank">
<span style="font-family: helvetica, sans-serif; font-size: 12px">
Message Boards
</span>
</a>
Update: i followed along like a tame sheep, but the target should have been _blank; _top refers to the top-level window. By the way: any name that doesn't exist yet results in a new window, so provided that no window with the name "foobar" exists,
Code:
<a href="foo.html" target="foobar">A new window</a>
opens a new window by the name of "foobar" (if it does exist, it opens the referred page in that window).
Oh, and I did some checking: the HTML 4.01 Recommendation doesn't say a word about the four general names, only about the use of target to address frames, and W3Schools indicates that the target attribute is not in the strict DTD.
What else do we use to open a new window then?!!
__________________
Regards,
Ronald.
ronaldvanderwijden.com

Last edited by ronaldb66; 01-24-2003 at 08:23 AM..
ronaldb66 is offline   Reply With Quote
Old 01-24-2003, 01:42 PM   PM User | #5
justame
Regular Coder

 
Join Date: Jun 2002
Posts: 676
Thanks: 1
Thanked 0 Times in 0 Posts
justame is on a distinguished road
mr. ...
/me would just a use® the ...target=_new ... to get just a new® window...n' leave yourrr 'clicked from here page' still in the background...


feyd...
ifin' they just a used® yours??? twouldnt that just a replace® their 'current' clicked from here page??? aka it twouldnt open just a new® browser???


ron...
"quote...What else do we use to open a new window then?!!...endquote"
/me just a uses® the ...target=_new
justame is offline   Reply With Quote
Old 01-24-2003, 02:47 PM   PM User | #6
Catman
Regular Coder

 
Join Date: Jun 2002
Location: Ames, IA, USA
Posts: 373
Thanks: 0
Thanked 0 Times in 0 Posts
Catman is an unknown quantity at this point
The loss of target is a mistake, I think.

The only workarounds I can think of: Use an onclick event to open a new window (which fails badly if javascript is not enabled), or add a message telling users to hold down the shift key if using IE or the control key if using Mozilla/Netscape while activating the link (which opens the file in a new window).

I dislike both.
__________________
Need more emoticons?
Visit Catman's Private Stock
Catman is offline   Reply With Quote
Old 01-24-2003, 06:05 PM   PM User | #7
Mr.Furious
New to the CF scene

 
Join Date: Jan 2003
Location: Los Angeles, CA
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Mr.Furious is an unknown quantity at this point
thx for all the help guys. i'm soooo glad i found this place.
Mr.Furious is offline   Reply With Quote
Old 01-24-2003, 07:26 PM   PM User | #8
Feyd
Regular Coder


 
Feyd's Avatar
 
Join Date: May 2002
Location: Los Angeles, CA Maxim: Subvert Society
Posts: 404
Thanks: 0
Thanked 0 Times in 0 Posts
Feyd is an unknown quantity at this point
Hey, I was up late and had a drastic dip in my caffeine level, so what if I was thinking blank and typed top...so shoot me people!
__________________
Moderator, Perl/CGI Forum
shadowstorm.net - subvert society
Feyd is offline   Reply With Quote
Old 01-25-2003, 03:05 AM   PM User | #9
justame
Regular Coder

 
Join Date: Jun 2002
Posts: 676
Thanks: 1
Thanked 0 Times in 0 Posts
justame is on a distinguished road
Quote:
Originally posted by Feyd
1...Hey, I was up late
2...had a drastic dip in my caffeine level,
3...so what if I was thinking blank and typed top...
4...so shoot me people! :thumbsup:
feyd...
1...just a excuses/excuses/excuses® hehehe...
2...just a rotflmao®!!!!!! wheeere is 'dom' whennn /me neeeds himmm...more lol'in...geeezzz.../me just a bout® spewed her [_]? readin' thattt from you!!! youuu??? caffine??? n' youuu used to 'request' /me n' dom nottt drink it??? lol...
3...thattts ok.../me totallly understands...since you dooo just a remember® /me isnt programmed to think either...:O)))
4...nahhh /me will just a hugs® ya instead...:O)))
justame is offline   Reply With Quote
Old 01-27-2003, 09:08 AM   PM User | #10
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
_new?

Justame,

the four general target values are _blank, _parent, _self and _top; _new isn't and will only open a new window named "_new" provided that it doesn't exist yet, falling under the "any name" cases.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Old 01-27-2003, 02:44 PM   PM User | #11
justame
Regular Coder

 
Join Date: Jun 2002
Posts: 676
Thanks: 1
Thanked 0 Times in 0 Posts
justame is on a distinguished road
ron...
/me just a uses® ..._new ...alll the time...aka...
<a href="whatever.html" target="_new">just a click® here n' whatever.html opens</a>
justame is offline   Reply With Quote
Old 01-27-2003, 03:41 PM   PM User | #12
Catman
Regular Coder

 
Join Date: Jun 2002
Location: Ames, IA, USA
Posts: 373
Thanks: 0
Thanked 0 Times in 0 Posts
Catman is an unknown quantity at this point
A sidenote: I was looking through the XHTML 2.0 specs the other day and noticed that target has been brought back. Let's hope that when they make 2.0 official, that remains true.
__________________
Need more emoticons?
Visit Catman's Private Stock
Catman is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:47 AM.


Advertisement
Log in to turn off these ads.