...

View Full Version : Proper way to open a link in new window



us3rd4n
07-26-2007, 04:58 AM
What is the xhtml strict method for creating a link that opens in a new window?
Or
What is the replacement for the "target=" element?

ez4me2c3d
07-26-2007, 05:13 AM
Why was the target attribute removed from XHTML 1.1?

It wasn't. XHTML 1.0 comes in three versions: strict, transitional, and frameset. All three of these were deliberately kept as close as possible to HTML 4.01 as XML would allow. XHTML 1.1 is an updated version of XHTML 1.0 strict, and no version of HTML strict has ever included the target attribute. The other two versions, transitional and frameset, were not updated, because there was nothing to update. If you want to use the target attribute, use XHTML 1.0 transitional.
You can always use JavaScript to pop open a link in a new window.
http://brucelawson.co.uk/index.php/2005/opening-links-in-new-windows-in-xhtml-strict/

abduraooft
07-26-2007, 07:14 AM
I recommend both of you to have a look at target="_" Strict Alternative (http://www.codingforums.com/showthread.php?t=117463)

Bill Posters
07-26-2007, 07:55 AM
Fwiw…

Here's my own (updated) take on the issue: Flag & toggle external links (http://test.newplasticarts.co.uk/dom-js/flag-toggle-external-links/)

Jutlander
07-26-2007, 09:26 AM
You shouldn't even force links to open in a new windows, let the user have the choice.

Bill Posters
07-26-2007, 09:38 AM
You shouldn't even force links to open in a new windows, let the user have the choice.

Rather than dredge up the debate yet again, I suggest people read what has already been said in the threads and articles to which people have already linked here.

At the very least, read them first to make sure you're making a new point.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum