HTML question - How do you open a link in a new window???

KaBudokan

Senior member
Oct 10, 1999
962
1
71
Hey guys... I'm a total HTML rookie here. Just trying to set up a link on my MP3.com page. I want the link to open in a new browser window when you click on it, instead of taking them away from my page by opening in the same window.

How do you do this?

(This should probably be in software somewhere, huh? But I figured at least ONE of you OT kids could help me out in a hurry;) )

Thanks mucho!!!
 

Lorax

Golden Member
Apr 14, 2000
1,658
0
0
what i do is place a 'target=&quot;AAA&quot;' after the <a href= part, where &quot;AAA&quot; is some random gibberish; so the link looks like:

<a href=http://www.anandtech.com target=&quot;AAA&quot;>Anandtech</a>

of course, if all your links use &quot;AAA&quot; as the target, all your links will lead to the SAME new window, so you might want to switch the lettering around

hope this helps, there might be a better way to do this but i dont know it.
 

hubbs

Platinum Member
Mar 26, 2000
2,442
0
0
If you want all the links to open in a new window all you have to do is put this on top of the page
<base target=&quot;new&quot;>
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
Or if you wanna do jscripting
<a href=&quot;#&quot; onclick=&quot;window.open('www.anandtech.com')&quot;>Anandtech</a>