By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,623 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,623 IT Pros & Developers. It's quick & easy.

target="_blank" with xHTML

P: n/a
Hi

How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?

I will use it with xHTML and CSS ... but the validator say's to me,
that this tag wasn't valid for xHTML! ... Why? Is there no "same
effect"-Tag in xHTML?

Thx for answers!
Jul 20 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
St. Rechsteiner wrote:
Hi

How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?


You don't. Use HTML4.01 if you need _blank.
Matthias

Jul 20 '05 #2

P: n/a
sc****@macprime.ch (St. Rechsteiner) wrote:
target="_blank"
Stop trying to mess with a user's UI.
Tag


Attribute

--
Spartanicus
Jul 20 '05 #3

P: n/a
On Tue, 24 Feb 2004 08:37:55 +0100, Matthias Gutfeldt wrote:
St. Rechsteiner wrote:
How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?


You don't. Use HTML4.01 if you need _blank.


You misspelled "a transitional DOCTYPE". HTH, etc. Or, possibly, you
misspelled "don't".

--
Some say the Wired doesn't have political borders like the real world,
but there are far too many nonsense-spouting anarchists or idiots who
think that pranks are a revolution.

Jul 20 '05 #4

P: n/a
In article <89**************************@posting.google.com >,
sc****@macprime.ch (St. Rechsteiner) wrote:
How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?
Attribute. It is allowed in XHTML1.0 Transitional. Author that if you
cannot let go of this 'demon from the old world'. Others will undoubtly
state why it is what it is.
I will use it with xHTML and CSS ...
If you 'will', then there is not much sense trying to convert you, sadly.
but the validator say's to me,
that this tag wasn't valid for xHTML! ... Why? Is there no "same
effect"-Tag in xHTML?


There are no effect tags in HTML. They were deprecated when the Flash
standard came out.

--
Kris
<kr*******@xs4all.netherlands> (nl)
<http://www.cinnamon.nl/>
Jul 20 '05 #5

P: n/a
sc****@macprime.ch (St. Rechsteiner) wrote:
How i made the same effect in xHTML like the - target="_blank" - Tag
It's an attribute, not a tag.
in HTML 4.01?
The same way you do in HTML 4.01.

XHTML 1.0 and HTML 4.01 are identical - in both of them the target
attribute exists only in the Transitional forms.

So I'm guessing that you're jumping from HTML 4.01 Transitional to
XHTML 1.0 Strict. Any reason why?
I will use it with xHTML and CSS ... but the validator say's to me,
that this tag wasn't valid for xHTML! ... Why?


Same reason that it's not in HTML 4.01 - anything to do with opening
new windows or frames is against the spirit of the Strict versions of
(X)HTML.

So in order of preference:
1. Stop trying to force a new window on your users, if they want a new
window they can open one themselves
2. Use a Transitional DTD instead
3. Use JavaScript

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #6

P: n/a
"St. Rechsteiner" <sc****@macprime.ch> wrote in message
news:89**************************@posting.google.c om...
Hi

How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?


Why? You wanna create a site that confuses your visitors?

From a usability study by Stanford University - "Users became reliably
confused when links opened new windows"
--

Karl Groves
http://www.karlcore.com
Jul 20 '05 #7

P: n/a
Owen Jacobson wrote:
On Tue, 24 Feb 2004 08:37:55 +0100, Matthias Gutfeldt wrote:

St. Rechsteiner wrote:
How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?


You don't. Use HTML4.01 if you need _blank.

You misspelled "a transitional DOCTYPE". HTH, etc. Or, possibly, you
misspelled "don't".


Err, nope, I didn't misspell anything. I just didn't quite think it through.
Matthias

Jul 20 '05 #8

P: n/a
On Tue, 24 Feb 2004, Spartanicus wrote:
sc****@macprime.ch (St. Rechsteiner) wrote:
target="_blank"


Stop trying to mess with a user's UI.
Tag


Attribute


http://www.flightlab.com/~joe/sgml/faq-not.txt part 5. SCNR.

Jul 20 '05 #9

P: n/a
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> wrote:
>Tag


Attribute


http://www.flightlab.com/~joe/sgml/faq-not.txt part 5. SCNR.


:)

--
Spartanicus
Jul 20 '05 #10

P: n/a
Karl Core wrote:
"St. Rechsteiner" ... ....
How i made the same effect in xHTML like the - target="_blank" - Tag
in HTML 4.01?

.... Why? You wanna create a site that confuses your visitors?

From a usability study by Stanford University - "Users became reliably
confused when links opened new windows"


You got a link for that Karl?

I got curious after hearing it for the umpteenth
time and went searching. I found this..
http://www-nlp.stanford.edu/~manning...h-allc2000.doc

While this document mentions useability
and (separately) 'Windows' and 'confuse',
it does not have that exact quote, or
anything I could see that might mean the
same..

( I am in the process of stripping frames and
other such usability barriers from my sites, it
would just be nice to be able to point to a
study that actually supports the expenditure
of effort. And to point others to. )

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
Jul 20 '05 #11

P: n/a
On Tue, 24 Feb 2004 08:53:00 +0000, Spartanicus <me@privacy.net>
wrote:
sc****@macprime.ch (St. Rechsteiner) wrote:
target="_blank"


Stop trying to mess with a user's UI.


To open a second window can be of much use. I am using it to open a
help for the actual running web application. I don't want to destroy
the original form, while using the help.

--
Martin
Jul 20 '05 #12

P: n/a
Martin Doering <do******@gmx.de> wrote:
target="_blank"


Stop trying to mess with a user's UI.


To open a second window can be of much use. I am using it to open a
help for the actual running web application. I don't want to destroy
the original form, while using the help.


1) It's not about what you want, or what you think a user wants, users
are perfectly capable of making these decisions themselves. Opening new
windows is part of the browser's UI, it's not for authors to attempt to
mess with a UA's UI.
2) target="_blank" does not open a popup (typically smaller than the
original window) that appears on top of the existing window, it opens a
new window that usually will cover the original window completely.

--
Spartanicus
Jul 20 '05 #13

P: n/a
Quoth the raven named Martin Doering:
On Tue, 24 Feb 2004 08:53:00 +0000, Spartanicus <me@privacy.net>
wrote:
sc****@macprime.ch (St. Rechsteiner) wrote:
target="_blank"


Stop trying to mess with a user's UI.


To open a second window can be of much use. I am using it to open a
help for the actual running web application. I don't want to
destroy the original form, while using the help.


The main problem with opening new windows occurs with visitors who
have small monitors and low resolution who tend to surf with the
browser maximized.

Your new window will completely overlay the original window containing
the form. It will also not have a functioning Back button. The
visitor doesn't realize there is a new window, and can't see the
original. So... they will probably just type some other URL, or go
back to their search engine. They will probably only discover your
original window when they decide to end their surfing session.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #14

P: n/a
DU
Martin Doering wrote:
On Tue, 24 Feb 2004 08:53:00 +0000, Spartanicus <me@privacy.net>
wrote:

sc****@macprime.ch (St. Rechsteiner) wrote:

target="_blank"


Stop trying to mess with a user's UI.

To open a second window can be of much use. I am using it to open a
help for the actual running web application. I don't want to destroy
the original form, while using the help.

--
Martin


Then at the very least follow the WAI recommendations on this by coding
the title attribute and by adding an icon clearly notifying the user
that clicking the link will open the referenced resource in a new,
separate window.
Don't interfere with users who will want to open such referenced
resource in a tab or in the same window. Let the users be in control of
the way such link can open the referenced resource. Users already have
all the settings, prefs, contextmenu commands to do such choice.

You can propose a scenario (open in a new window, reusable or not,
recyclable or not) but you should not force it by interfering with other
possible ways which may better fit the user.

DU
Jul 20 '05 #15

P: n/a
DU
Spartanicus wrote:
Martin Doering <do******@gmx.de> wrote:

target="_blank"

Stop trying to mess with a user's UI.
To open a second window can be of much use. I am using it to open a
help for the actual running web application. I don't want to destroy
the original form, while using the help.

1) It's not about what you want, or what you think a user wants, users
are perfectly capable of making these decisions themselves. Opening new
windows is part of the browser's UI, it's not for authors to attempt to
mess with a UA's UI.


You can still code the opening of a new window, then make it clear to
the user that clicking the link will open a new window (or it will
re-use an already opened popup). From there, the user can still choose
to open the referenced resource in the same window or in a tab (in the
background or not) or even in an unnamed (un-reusable, un-recyclable)
separate window (in the background or not). I'm for an approach that
informs in advance the user of a proposed scenario for a link and an
approach that does not interfere with his UI prefs/contextmenu commands.
2) target="_blank" does not open a popup (typically smaller than the
original window) that appears on top of the existing window,
A popup (opened with window.open())is not typically smaller than the
original window. A popup can be any size actually.

it opens a new window that usually will cover the original window completely.


Usually, yes. In fact, a secondary window opened thanks to
target="_blank" will be the same size as its parent/opener; its position
will be offset 15 pixels to its bottom and 15 pixels to its right so
that when it pops up, the user has better chances to notice its creation.
So, usually, yes because users with small, medium scr. size will have
their browser window maximized.
When the user has his window (parent/opener) maximized, then there is
less chances, opportunities to notice that a new separate window was
created since it can not be offset toward the bottom and the right side.

DU
Jul 20 '05 #16

P: n/a
On Tue, 24 Feb 2004, Martin Doering wrote:
To open a second window can be of much use.


I often find it useful, indeed. But rarely on the same occasions that
the web page author decided that I should want it.

Jul 20 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.