Replacement for _target?

L

leupi

I know that the _target attribute has been depreciated. Is there a
suitable replacement for it? What are your thoughts on using an
attribute to force a new page to open in a new window? If I design a
site with a link to another site I would prefer to have that new link
open up in a new window so that the visitor is not whisked away from my
site. Is this considered acceptable or is it considered intrusive to the
user?

Thanks,
Todd
 
J

Jonathan N. Little

leupi said:
I know that the _target attribute has been depreciated. Is there a
suitable replacement for it? What are your thoughts on using an
attribute to force a new page to open in a new window? If I design a
site with a link to another site I would prefer to have that new link
open up in a new window so that the visitor is not whisked away from my
site. Is this considered acceptable or is it considered intrusive to the
user?

Much, much, and much discussed here. Short answer, don't. Let the user
decide where or not to open link into another window|tab. What is
acceptable it to use a little arrow off-site symbol commonly seen on
sites like on wikipedia to indicate that the link goes off your site:

http://en.wikipedia.org/skins-1.5/monobook/external.png
 
A

Adrienne Boswell

I know that the _target attribute has been depreciated. Is there a
suitable replacement for it? What are your thoughts on using an
attribute to force a new page to open in a new window? If I design a
site with a link to another site I would prefer to have that new link
open up in a new window so that the visitor is not whisked away from my
site. Is this considered acceptable or is it considered intrusive to the
user?

Thanks,
Todd

External links should open in the same window/tab. Let the user decide to
open in a new tab/window. You could put an icon a la Wikipedia to indicate
an external site, and/or you can put something in the title attribute.
 
B

Blinky the Shark

leupi said:
I know that the _target attribute has been depreciated.

Yes, they're down to about half a euro now.
Is there a suitable replacement for it? What are your thoughts on using
an attribute to force a new page to open in a new window? If I design a
site with a link to another site I would prefer to have that new link
open up in a new window so that the visitor is not whisked away from my
site. Is this considered acceptable or is it considered intrusive to the
user?

The latter. I'll make that decision myself.
 
T

Travis Newbury

I know that the _target attribute has been depreciated.

But I seriously doubt that any browser will stop supporting it in our
lifetimes. Probably not a good idea to have a pop-up, but the option
to do it will never go away.
 
R

rf

leupi said:
I know that the _target attribute has been depreciated. Is there a suitable
replacement for it?

No.

Why deprecate something and then replace it with something else. It is the
*idea* that is deprecated.
What are your thoughts on using an attribute to force

You cannot force on the web. That is why modern browsers come with an option
to prevent web pages opening new windows.
a new page to open in a new window?
Don't.

If I design a site with a link to another site I would prefer to have that
new link open up in a new window so that the visitor is not whisked away
from my site.

But the visitor *is* wisked away from your site. There is a new browser
window covering up your site. Unless the viewer is savvy enough to use the
"close browser" button rather then the more intuitive "back" button your
site will remain hidden forever.
Is this considered acceptable or is it considered intrusive to the user?

Read the other thousands of discussions on this matter.
 
E

Ed Mullen

leupi said:
I know that the _target attribute has been depreciated. Is there a
suitable replacement for it? What are your thoughts on using an
attribute to force a new page to open in a new window? If I design a
site with a link to another site I would prefer to have that new link
open up in a new window so that the visitor is not whisked away from my
site. Is this considered acceptable or is it considered intrusive to the
user?

In addition to the other comments on this issue, you cannot force my
browsers to open a new window no matter what tag/technique you use. So,
forget wanting something that can be assured won't work for a large
portion of the potential user base.
 
D

dorayme

In addition to the other comments on this issue, you cannot force my
browsers to open a new window no matter what tag/technique you use.

Oh yeah? Go to your roof Ed and see the the helicopter with men
in black descending on ropes? They are headed to fix up - your
(ha!) - browser preferences the way Leupi wants...
 
E

Ed Mullen

dorayme said:
Oh yeah? Go to your roof Ed and see the the helicopter with men
in black descending on ropes? They are headed to fix up - your
(ha!) - browser preferences the way Leupi wants...

Well, crap. I didn't know military black ops where on the table in the
discussion! Ok, never mind!!!
 
W

William Gill

leupi said:
... so that the visitor is not whisked away from my
site.

Philosophically I agree. Work hard on a site, attract a targeted
audience then send theme down the street. So my question to you is: why
are you linking people away. Are the links references in support of an
idea? If so, visitors who go there should be able to view them
independent of your page, and can return at will. However if are you
linking them away because your content is missing something, there lies
the problem. IMHO judicious and appropriate use of links may be your
solution.
 
A

Andy Dingley

I know that the _target attribute has been depreciated.

It hasn't been deprecated, nor has anything changed related to the
target attribute recently (since about 10 years ago).

At the time HTML 4 was written, target was only considered to be
related to frames, and frames were already seen as being a bad idea.
Target, as a means of opening a new window, wasn't as widely used as
it was later, mainly owing to the slower performance of browsers and
their lack of tabbed browsing.

Target _was_ removed from HTML 4 Strict, but it remained in HTML 4
Transitional and has never been deprecated (that has a specific
meaning, which this doesn't match). Depending on which version of
history you read, this was either because target (as related to
frames) was obsolete, or because target (as related to the exciting
new world of dynamic HTML) wasn't adequate and it would soon be
replaced by something better. For HTML 4 it's probably the first, for
XHTML 1.0 to XHTML 1.1, it's the latter -- a big shiny new & improved
target module for XHTML will be along Real Soon Now.


So in the meantime there are _two_ concerns to worry about:

* Is opening new windows a good idea?

* How should new window openers be coded?


There's no agreement on the first, other than a grudging acceptance
(from both camps) that it depends on the context. The most hardcore
"open everything new" advocates wouldn't suggest it for a simpel site
nav menu, the most anti-popup coder _might_ agree to the odd one for a
zoom window on an image gallery - provided that it was recycled
between images and the window focus was correctly managed. "Off site"
navigation from an "index" site (i.e. external links from wikipedia or
google) are a more contentious case.

There's less need for target now than there used to be. Tabbed
browsers, Control-click to open a new window, better experienced
users, all these mean that the concept "Let the user decide" may
finally have some bearing on reality. A few years ago, users simply
didn't know that they _could_ open new windows. There's some mileage
now in the notion that it's easy for a user to open a new window when
they want, harder to _avoid_ opening one when they don't but the site
coder did. So make the default to not do it.

Really though, it's up to you to decide. It's not a "bad" site whether
it does or doesn't. Your call.


As to how to code it, then you can do all sorts of tricks. Add it to a
HTML 4.01 Strict page, making it invalid markup but still letting your
validator check that you haven't used a <font> tag as well (as if you
would). Drop back to HTML 4.01 Transitional and have completely valid
pages, but a few pinheads telling you that this page is somehow
"wrong" because it uses a retrograde doctype. Naturally you'll avoid
the <font> tags whatever.

If you do choose to use JavaScript and window.open(), then certainly
you should use target (to support non-JS browsers). If you've already
decided that you _will_ use popup windows, then at least do it
properly and ignore the peanut gallery who can only squawk, "target
bad", "Transitional bad", "Four legs good".
 
T

Tim Streater

Andy Dingley said:
It hasn't been deprecated, nor has anything changed related to the
target attribute recently (since about 10 years ago).

At the time HTML 4 was written, target was only considered to be
related to frames, and frames were already seen as being a bad idea.
Target, as a means of opening a new window, wasn't as widely used as
it was later, mainly owing to the slower performance of browsers and
their lack of tabbed browsing.

Target _was_ removed from HTML 4 Strict, but it remained in HTML 4
Transitional and has never been deprecated (that has a specific
meaning, which this doesn't match). Depending on which version of
history you read, this was either because target (as related to
frames) was obsolete, or because target (as related to the exciting
new world of dynamic HTML) wasn't adequate and it would soon be
replaced by something better. For HTML 4 it's probably the first, for
XHTML 1.0 to XHTML 1.1, it's the latter -- a big shiny new & improved
target module for XHTML will be along Real Soon Now.


So in the meantime there are _two_ concerns to worry about:

* Is opening new windows a good idea?

* How should new window openers be coded?


There's no agreement on the first, other than a grudging acceptance
(from both camps) that it depends on the context. The most hardcore
"open everything new" advocates wouldn't suggest it for a simpel site
nav menu, the most anti-popup coder _might_ agree to the odd one for a
zoom window on an image gallery - provided that it was recycled
between images and the window focus was correctly managed. "Off site"
navigation from an "index" site (i.e. external links from wikipedia or
google) are a more contentious case.

There's less need for target now than there used to be. Tabbed
browsers, Control-click to open a new window, better experienced
users, all these mean that the concept "Let the user decide" may
finally have some bearing on reality. A few years ago, users simply
didn't know that they _could_ open new windows. There's some mileage
now in the notion that it's easy for a user to open a new window when
they want, harder to _avoid_ opening one when they don't but the site
coder did. So make the default to not do it.

Really though, it's up to you to decide. It's not a "bad" site whether
it does or doesn't. Your call.


As to how to code it, then you can do all sorts of tricks. Add it to a
HTML 4.01 Strict page, making it invalid markup but still letting your
validator check that you haven't used a <font> tag as well (as if you
would). Drop back to HTML 4.01 Transitional and have completely valid
pages, but a few pinheads telling you that this page is somehow
"wrong" because it uses a retrograde doctype. Naturally you'll avoid
the <font> tags whatever.

If you do choose to use JavaScript and window.open(), then certainly
you should use target (to support non-JS browsers). If you've already
decided that you _will_ use popup windows, then at least do it
properly and ignore the peanut gallery who can only squawk, "target
bad", "Transitional bad", "Four legs good".

Useful post, thanks. I typically use it with target='_top' from with a
frameset, since the page where the user is going from there, they will
previously have been used to seeing not in a frameset.

Agree about the peanut gallery.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top