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

TARGET="_top" in strict HTML ?

P: n/a
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML.
How do I change the line to meet the requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>

Arty

Jul 20 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML.
How do I change the line to meet the requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>


<a href="http://www.targetedomain.com/">...</a>
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

P: n/a
Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not
allowed under strict XHTML. How do I change the line to meet the
requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>


If you are using frames, use a transitional doctype for the documents loaded
into the frames (or resort to unreliable JavaScript).

.... and correct the case of your tags and attributes. <a href, not <A HREF.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #3

P: n/a
Please fix your newsreader to wrap lines in messages you compose to 65
characters or so. Thank you.

Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag
Why do you do this?
which is not allowed under strict XHTML.
Correct. You could change the dtd to a transitional one, to
accomodate the markup you use.
How do I change the line to meet the requirements of strict HTML?
Remove the target attribute.
<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>


<A HREF="http://www.targetedomain.com/">...</A>

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4

P: n/a
Brian wrote:
which is not allowed under strict XHTML.
<A HREF="http://www.targetedomain.com/">...</A>


Don't confuse him, give him a correct answer at once. Lowercase please.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #5

P: n/a
Anne van Kesteren wrote:
Brian wrote:
which is not allowed under strict XHTML.

<A HREF="http://www.targetedomain.com/">...</A>


Don't confuse him, give him a correct answer at once. Lowercase please.


Missed the xhtml thing. I never touch the stuff, myself.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #6

P: n/a
Quoth the raven named Arthur Connor:
Currently I specified a TARGET attribute inside an <A> tag which is
not allowed under strict XHTML. How do I change the line to meet
the requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>


target is not allowed in XHTML Strict.

http://www.w3schools.com/tags/tag_a.asp

What is the real reason you want to use it?

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

P: n/a
In article <bt*************@news.t-online.com> in
comp.infosystems.www.authoring.html, Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML.
How do I change the line to meet the requirements of strict HTML?


You remove the target attribute, of course.

If you mean, is there another HTML way to hijack the user's desktop
by opening extra windows, the answer is No. You'd have to go to
Javascript, accepting that quite a lot of us have turned off JS in
response to such antics.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #8

P: n/a
Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not
allowed under strict XHTML. How do I change the line to meet the
requirements of strict HTML?


You cannot. Strict HTML/XHTML assumes you've already thrown away cruft like
frames. Either lose the frames or go back to Transitional.
--
Jim Dabell

Jul 20 '05 #9

P: n/a

"Arthur Connor" <ar***@redseven.com> wrote in message
news:bt*************@news.t-online.com...
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML. How do I change the line to meet the requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>

Arty


Remove the target attribute, or use a loose DTD. If it's a frames site. And
my unsolicited comment is that friends don't let friends use frames.

If it's not a frames site, still remove the target, because (1) new windows
for links are a sign that the web author thinks more highly of his site than
the user's desires and (2) as more and more people block popups, the link
will be killed anyhow. I request users open some links in a new window, but
even if they don't they do have the Back button to come back to my site.
Jul 20 '05 #10

P: n/a
On Sun, 4 Jan 2004 14:40:41 +0100, ar***@redseven.com (Arthur Connor)
wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML.


Use Transitional (or search this ng.)
Jul 20 '05 #11

P: n/a

"Andy Dingley" <di*****@codesmiths.com> wrote in message
news:v6********************************@4ax.com...
On Sun, 4 Jan 2004 14:40:41 +0100, ar***@redseven.com (Arthur Connor)
wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not
allowed under strict XHTML.
Use Transitional (or search this ng.)


You know, it's funny. Four posts in a row posted to ciwah and ciwas.
Followups set to ciwas only.

If you're like me, you read ciwah first because it comes first
alphabetically. You see a post with no responses, you reply, not knowing
that umpteen others have also responded. Seems WAY too coincidental to me.
Plus, all 4 posts are on very basic stuff.

Should we be contacting Oliver Stone on this?
Jul 20 '05 #12

P: n/a
Arthur Connor wrote:
Currently I specified a TARGET attribute inside an <A> tag which is not allowed under strict XHTML.
How do I change the line to meet the requirements of strict HTML?

<A HREF="http://www.targetedomain.com/" TARGET="_top">...</A>


In theory, this should never be a problem. In other words, if you use
frames, then you don't have the ideology of strict (HTML for structure,
CSS for styles, JS for interaction) and if you use strict, you wouldn't
want to ruin it with presentational relics like frames.

If you want to use "target" you should use Transitional. You can also
cheat with JS, but I wouldn't recommend it.

Jul 20 '05 #13

P: n/a
In article <ED***************@fe01.usenetserver.com>, Keith Bowes
<do****@spam.me> wrote:
If you want to use "target" you should use Transitional. You can also
cheat with JS, but I wouldn't recommend it.


Well then, how should one handle the following hypothetical scenario:

Suppose you have a web site that is pushing data in real time, and you
want to have the browser window refresh periodically. Further suppose
that you have two sets of info that need to refresh at different rates.
For this, you want two browser windows that have been spawned from a
common source, with different meta-fresh values.

Without "target" or Javascript, how do you accomplish this
transparently?

--
Jim Royal
"Understanding is a three-edged sword"
http://JimRoyal.com
Jul 20 '05 #14

P: n/a
In article <3f**********************@news.rcn.com> in
comp.infosystems.www.authoring.stylesheets, Neal wrote:
You know, it's funny. Four posts in a row posted to ciwah and ciwas.
Followups set to ciwas only.

If you're like me, you read ciwah first because it comes first
alphabetically. You see a post with no responses, you reply, not knowing
that umpteen others have also responded. Seems WAY too coincidental to me.


And the four posts are made with four different "From" names. Quite
a coincidence to see this happen four times in short order when I
can't remember it ever happening before.

I think we've been punked.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #15

P: n/a

[f'ups suggested to a more appropriate group]

On Sun, 4 Jan 2004, Jim Royal wrote:
In article <ED***************@fe01.usenetserver.com>, Keith Bowes
<do****@spam.me> wrote:
If you want to use "target" you should use Transitional. You can also
cheat with JS, but I wouldn't recommend it.
Well then, how should one handle the following hypothetical scenario:

Suppose you have a web site that is pushing data in real time, and you
want to have the browser window refresh periodically.


HTML Strict doesn't concern itself with such presentation details.
What's a "browser window" when the client agent is a brailler, a
summarising robot, etc. etc.?
Further suppose that you have two sets of info that need to refresh
at different rates. For this, you want two browser windows that have
been spawned from a common source, with different meta-fresh values.
HTML Strict doesn't concern itself with such presentation details.
Without "target" or Javascript, how do you accomplish this
transparently?


Perhaps you're wanting to have too much detailed control over
presentation. Not all client agents present their display using
windows.

But if you don't want what HTML Strict offers, why would you be trying
to use it?
Jul 20 '05 #16

P: n/a
In article <ED***************@fe01.usenetserver.com>, one of infinite monkeys
at the keyboard of Keith Bowes <do****@spam.me> wrote:
You can also
cheat with JS, but I wouldn't recommend it.


I would very firmly recommend it as second-best to getting rid of the
need for target= altogether. You achieve the same effect for
bells-and-whistles viewers, while leaving users who might have trouble
with it more chance to take control.
--
Nick Kew
Jul 20 '05 #17

P: n/a

"Stan Brown" <th************@fastmail.fm> wrote in message
news:MP************************@news.odyssey.net.. .
And the four posts are made with four different "From" names. Quite a coincidence to see this happen four times in short order when I can't remember it ever happening before.
Different emails too, but the same source in the path.
I think we've been punked.


Indeed.
Jul 20 '05 #18

P: n/a

"Nick Kew" <ni**@fenris.webthing.com> wrote in message
news:ba***********@jarl.webthing.com...
In article <ED***************@fe01.usenetserver.com>, one of infinite monkeys at the keyboard of Keith Bowes <do****@spam.me> wrote:
You can also
cheat with JS, but I wouldn't recommend it.
I would very firmly recommend it as second-best to getting rid

of the need for target= altogether. You achieve the same effect for
bells-and-whistles viewers, while leaving users who might have trouble with it more chance to take control.


You're still going to piss a lot of people off with popups. I
really can't think of a time they're needed aside from trying to
make a buck.
Jul 20 '05 #19

P: n/a

"Jim Dabell" <ji********@jimdabell.com> wrote in message
news:e9********************@giganews.com...
Neal wrote:
[snip]
You're still going to piss a lot of people off with popups. I
really can't think of a time they're needed aside from trying to make a buck.
I think a lot of people have missed something here:

target="_top" doesn't open a new window. It replaces the top frameset with the new document. Are you thinking of target="_blank"?


Yes I was. Actually, target="_top" is useful, but allowing it
opens the door for all sorts of abuses and crimes. As it's
disallowed, then we have to educate the public that they can
right-click, open a new page, and trash that frames site. That
technique does away with the need for the target attribute
totally.

Except in framesets, which no right-thinking human likes anyhoo.
;)
Jul 20 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.