How to open a new browser window

Dreamweaver & Flash (ahh ahhh) plus Web related Tutorials & Resources, HTML, CSS, PHP, Flash or whatever.
Post Reply
morphim
Site Admin
Posts: 609
Joined: January 5th, 2006, 2:21 pm
Location: Next Rock after the one Cow's at

How to open a new browser window

Post by morphim » June 30th, 2006, 3:56 pm

Hello

How can I get my site to open new windows for external links. Currently all links overwrite my site.
I want my site to stay active in it's original window, so people aren't navigating away.

How do?

Fanks in advance :D

(my site, my site, my site ... in case I hadn't mentioned, it's my site :roll: :wink: )

odog
Big Bird's nest fluffer
Posts: 168
Joined: January 6th, 2006, 8:58 am
Location: The Emerald Isle (Oirland)
Contact:

Post by odog » July 5th, 2006, 7:44 am

Picked this up on another forum. Haven't tried it, but it should work (I think ;)).

Code: Select all

<a href="some.html"
   onclick="return !window.open(this.href);">somewhere</a>
The sooner you fall behind, the more time you have to catch up.

Simon
A Pig in Space
A Pig in Space
Posts: 484
Joined: January 7th, 2006, 10:55 am
Location: Devon
Contact:

Re: How to open a new browser window

Post by Simon » July 5th, 2006, 10:41 am

morphim wrote: (my site, my site, my site ... in case I hadn't mentioned, it's my site :roll: :wink: )
your site then, ooooh! cannot wait :shock:
there is a god, and i am him

odog
Big Bird's nest fluffer
Posts: 168
Joined: January 6th, 2006, 8:58 am
Location: The Emerald Isle (Oirland)
Contact:

Post by odog » July 5th, 2006, 2:20 pm

If you want to be really standards compliant then this is something I found today.

http://test.newplasticarts.co.uk/flag-offsite-links/

Enough about your site, what about Citizen Art? :twisted: .
The sooner you fall behind, the more time you have to catch up.

Paul Stones
Ernie's rubber duckie
Ernie's rubber duckie
Posts: 283
Joined: January 6th, 2006, 11:00 pm
Location: Onanism zone

Post by Paul Stones » July 5th, 2006, 10:50 pm

<a href="www.somewhere.com" target="_blank">www.somewhere.com</a>

odog
Big Bird's nest fluffer
Posts: 168
Joined: January 6th, 2006, 8:58 am
Location: The Emerald Isle (Oirland)
Contact:

Post by odog » July 6th, 2006, 7:58 am

Paul Stones wrote:<a href="www.somewhere.com" target="_blank">www.somewhere.com</a>
I just found out recently that the target property in a link is now deprecated, so it won't validate.
The sooner you fall behind, the more time you have to catch up.

cow
A Pig in Space
A Pig in Space
Posts: 309
Joined: January 6th, 2006, 10:44 am
Location: 4th rock from morphims house
Contact:

Post by cow » July 6th, 2006, 5:29 pm

It's time we realise they pull bits out of the specification just to justify their existance.
<? include['cows go moo'] ?>

Simon
A Pig in Space
A Pig in Space
Posts: 484
Joined: January 7th, 2006, 10:55 am
Location: Devon
Contact:

Post by Simon » July 6th, 2006, 11:52 pm

cow wrote:It's time we realise they pull bits out of the specification just to justify their existance.
true, if it works why change it... :roll:
there is a god, and i am him

morphim
Site Admin
Posts: 609
Joined: January 5th, 2006, 2:21 pm
Location: Next Rock after the one Cow's at

Post by morphim » July 7th, 2006, 9:33 am

Thanks everybody. I'm going to put all of the above in ... just not necessarily in the same order :D

Post Reply