Reply
How do I create a link in a new window?
Old 10-25-2006, 12:40 PM How do I create a link in a new window?
Novice Talker

Posts: 8
Very Simple question:

To create a link to another page in the existing window, I simply type:

<a href="popup.asp">Test this</a>

But how would I modify this code to get the link to appear in a new window? preferably that is minimized to a small size that only covers about a quarter of the screen or even less?
gfunkera is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-25-2006, 04:27 PM Re: How do I create a link in a new window?
LadynRed's Avatar
Super Moderator

Posts: 6,699
Location: Tennessee
<a href="popup.asp" target=_blank>Test this</a>

Although I would discourage the use of the target attribute. Using some javascript instead would be better:
http://www.456bereastreet.com/archiv...pt_version_12/
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 11-01-2006, 03:19 PM Re: How do I create a link in a new window?
Novice Talker

Posts: 8
Thanks for that quick simple reply. But why would you discourage using 'target' attribute?
gfunkera is offline
Reply With Quote
View Public Profile
 
Old 11-01-2006, 03:34 PM Re: How do I create a link in a new window?
Skilled Talker

Posts: 54
Name: Shannon
Sounds like your best bet would be javascript. I would do a search for a javascript pop-up window.

You would be able to find many that would fit your needs.

This is a generic script from Dreamweavers snippets.

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
if(popUpWin)
{
if(!popUpWin.closed) popUpWin.close();
}
popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,m enubar=no,scrollbars=no,resizable=no,copyhistory=y es,width='+width+',height='+height+',left='+left+' , top='+top+',screenX='+left+',screenY='+top+'');
}

Hope this helps
shannonlp is offline
Reply With Quote
View Public Profile Visit shannonlp's homepage!
 
Old 11-01-2006, 07:40 PM Re: How do I create a link in a new window?
Nahele's Avatar
Extreme Talker

Posts: 199
Quote:
Originally Posted by gfunkera View Post
Thanks for that quick simple reply. But why would you discourage using 'target' attribute?
W3C has deprecated this attribute in XHTML
__________________
The worst things in life allow us to appreciate the best things

virtual kudos (a.k.a. talkupation) always welcome where deserved.
Nahele is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How do I create a link in a new window?
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16196 seconds with 12 queries