473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

TARGET="_top" in strict HTML ?

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
19 11159
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
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
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
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
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
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
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
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

"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
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

"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
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
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
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

[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
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

"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

"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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob McLennan - ZETLAND | last post by:
Hi, I'm relatively clueless when it comes to correct ASP syntax. I'm testing out a search form for my company's website which is done in ASP. The results are displayed as per the code shown at the...
8
by: Dave | last post by:
Hello, I have written a website www.pusspaws.net, my problem is in the gallery section. I have coded ... <object type="text/html" data="galleryobj.html" border="0" width="422"...
3
by: Arthur Connor | last post by:
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...
4
by: socialism001 | last post by:
I have the following code in my cgi script. How would I use target="_top" in the code below so that it would prevent my page from opening in a frame. Thanks, Chris ********************* my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.