opening links in a new tab or windows? (General)

by peter21 @, Saturday, September 04, 2010, 10:50 (5003 days ago)

Hi!

I would like to know if it is possible that when someone write a link in a post (like http://www.google.es), by clicking the link, the URL is opened in another browser tab or window.

I would like the forum to do that by default.

Thanks.

Avatar

opening links in a new tab or windows?

by Micha ⌂, Wednesday, September 08, 2010, 11:13 (4999 days ago) @ peter21

Hello,

I would like the forum to do that by default.

In most html-version, the target attribute is deprecated. A workaround is to use a JavaScript, see e.g. http://accessify.com/features/tutorials/new-windows/. In any case, the best solution is to disclaim...

regards
Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

opening links in a new tab or windows?

by Alfie ⌂, Vienna, Austria, Wednesday, September 08, 2010, 12:19 (4999 days ago) @ Micha

Hi Micha & Peter!

In most html-version, the target attribute is deprecated.

Well, just in 'Strict' variants. Still valid in 'Transitional'.

A workaround is to use a JavaScript, see e.g. http://accessify.com/features/tutorials/new-windows/.

IMHO no good idea. Even if JavaScript is active, PopUps may still be blocked. Inexperienced users may be trapped - or even are not allowed to change the browser's settings (in some restrictive companies...).

It might be better to change the version from 'Strict' to 'Transitional':

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

=>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

... and modify scripts to open in a new window. Instead of

<a href="foo">bar</a>

use

<a href="foo" target="_blank">bar</a>

There is no method to force a link to open in new tab - this is set by the user in his/her browser's preferences.

In any case, the best solution is to disclaim...

Agree. 'My browser belongs to me!'

--
Cheers,
Alfie (Helmut Schütz)
BEBA-Forum (v1.8β)

RSS Feed of thread