Miscellaneous > Programming & Networking

Will someone PLEASE tell me how to do this!!!!

(1/4) > >>

Pissed_Macman:
I have asked this before and no one seemed to know the answer. How the HELL do you set a link to open in a new window? It's got to be possible because it happens every time we open them at this site!!

slave:
<a href="http://www.google.com"target="_new">google</a>

opens google in a new window

notice the target="_new"

Pantso:
Actually that would be:


--- Code: ---
--- End code ---

and yes the 'target' attribute is responsible for that.
   ;)

EDIT: Always enclose target names in quotation marks. Keep also in mind that they're case sensitive!

The W3C discourages the use of the 'target' attribute and has actually removed it from (X)HTML strict. I happen to disagree though, as do most people. It could be annoying if you use it all of the time but it could prove useful as well. Your choice.
   

[ May 03, 2003: Message edited by: Panos ]

flap:

quote:It's got to be possible because it happens every time we open them at this site!!
--- End quote ---


Why didn't you just look at the source of a page from this site then?

Pissed_Macman:
I did, but I'm not exactly a code guy. I even narrowed down the right tag, but I didn't know how to apply it till Panos just showed me. The reason I need this is because if you click on a link with a .tk domain it will send you to the page but it won't change the address. So I could send someone to Microsoft.com and it would still say they're at macrevolution.tk. Opening links in a new window fixes this.

Navigation

[0] Message Index

[#] Next page

Go to full version