Click to See Complete Forum and Search --> : 4.01 strict validation - target


Beach Bum
11-26-2002, 08:49 PM
i have the following statement in the head of my html

<base target="bottom">

this page is part of a frameset, and bottom is the defined target frame. there are several links on the page that then open in the frame named "bottom".

works great.

then i also have a link on the same page that opens replacing the frameset. so i have this

<a href="xxxx.htm" target="_top">

and i have a link on the same page that opens to a new window. so i have this

<a href="xxxx.htm" target="_blank">

also works great.

but . . . all three statements flunk the 4.01 strict validation. the mesages all say that target is not valid attribute.

from reading the spec i cannot figure out what it wants.

can someone tell me what the spec is looking for in these three examples?

Charles
11-26-2002, 09:11 PM
A good while back I went through the same thing. As you've noted, there is no TARGET attribute in HTML 4.01 Strict. If you're going to use frames then you're going to have to use 4.01 transitional. There's no shame in that, but I confess that I wasn't able to do it myself. I gave up on frames rather than lower myself to using a transitional DTD. If it helps it looks like the TARGET attribute will be back in XHTML 2.0 (http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-target.html#s_targetmodule).

Beach Bum
11-26-2002, 09:18 PM
OK so forget the frames part.

what about the old targets _top and _blank to specify the current or a new window? how do you do that in strict?

Stefan
11-27-2002, 12:45 AM
Originally posted by Beach Bum
what about the old targets _top and _blank to specify the current or a new window? how do you do that in strict?

You don't. You let the visitor decide if they really want a new window or not (that goes for _blank, _top is not really meaningfull unless you use frames to begin with anyway :D ).

If you really want to keep annoying your visitors by opening unrequested new windows in STRICT you could of cource use eg onclick="" and JavaScript. ;)

Stefan
11-27-2002, 12:47 AM
Originally posted by Charles
If it helps it looks like the TARGET attribute will be back in XHTML 2.0

That's probably related with Frames making a comeback
http://www.w3.org/TR/2002/WD-xframes-20020806/

Rick Bull
11-27-2002, 04:38 AM
Originally posted by Stefan
If you really want to keep annoying your visitors by opening unrequested new windows in STRICT you could of cource use eg onclick="" and JavaScript. ;)

Remember that it doesn't work very well in Mozilla (and I assume Netscape) though, and responds to right and left clicks too, so I just stear clear of them.

Charles
11-27-2002, 05:05 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Window Example</title>
<p><a href="http://www.w3.org/" onclick="window.open(this.href); return false">W3C</a></p>

Works just fine on Opera, Mozilla, MSIE and NN 4.

Stefan
11-27-2002, 08:59 AM
Originally posted by Charles
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Window Example</title>
<p><a href="http://www.w3.org/" onclick="window.open(this.href); return false">W3C</a></p>



Psst, you forgot
<meta http-equiv="Content-Script-Type" content="text/javascript">

;)

Charles
11-27-2002, 09:02 AM
Indeed I did. Thanks for catching that.

Robert Wellock
11-27-2002, 10:50 AM
It stands to reason if they bring back frames although in a different context that target will reappear, anyhow I've been waiting above a year the CSS-3 roadmap to get a little further, LOL.

Rick Bull
11-27-2002, 11:25 AM
Originally posted by Charles
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Window Example</title>
<p><a href="http://www.w3.org/" onclick="window.open(this.href); return false">W3C</a></p>

Works just fine on Opera, Mozilla, MSIE and NN 4.

Was that in response to my post? If so I just meant it opens a new window even if you don't left click the link, not that it won't work in Mozilla. Not sure if that's a browser bug, or if it's following the spec. Can anyone clear that up?

Beach Bum
11-27-2002, 11:48 AM
OK, thanks guys

i will stay clear of strict validation.

and i will never give up my frames. such an easy way to build segmented windows. maybe i will reconsider when fixed gets more broad support.

Stefan
11-27-2002, 12:23 PM
Originally posted by Beach Bum
OK, thanks guys

i will stay clear of strict validation.

and i will never give up my frames. such an easy way to build segmented windows. maybe i will reconsider when fixed gets more broad support.

Yes it's unfortunate that IE is broken with position fixed :(

And I also think that it was a big mistake to remove frames before x-frames was ready.
It's an excellent way of creating page "inclusions" if you don't have access to serverside methods.
Happy to see it will be back in XHTML2

One thing to remember though, even if you use a Transitional doctype you should strive to make the page as valid to STRICT as possible.
Transitional is there so you can add support for old browsers on your STRICT page, not a general loophole to use all that deprecated crap that shouldn't have been in the HTML spec to begin with, like eg <font>.

In short, start with a STRICT page and change the doctype to transitional on those pages that need a target attribute.

Stefan
11-27-2002, 12:29 PM
Originally posted by Robert Wellock
anyhow I've been waiting above a year the CSS-3 roadmap to get a little further, LOL.

Well, I guess CSS 2.1 will hit the road a lot earlier then CSS 3 and much of the "good stuff" form CSS 3 will appear already with 2.1 :)

http://www.w3.org/TR/CSS21/

Robert Wellock
11-28-2002, 05:48 AM
How I missed the revision I don't know, perhaps there was a lot of embarrassment about three taking so long. ;)

Stefan
11-28-2002, 07:12 AM
Originally posted by Robert Wellock
How I missed the revision I don't know, perhaps there was a lot of embarrassment about three taking so long. ;)

Well they are pretty good at hiding it I guess :D
You almost have to know it exsists before you can track it down, since when they talk about the future it's about CSS 3.

Anyway 2.1 has been on "last call" since august, so I guess it should be a finished spec in too long. :)

Robert Wellock
11-28-2002, 09:35 AM
But can you explain this:

4.3.5 Colors
A <color> is either a keyword or a numerical RGB specification.

The list of keyword color names is: aqua, black, blue, fuchsia, gray, green, lime,
maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow. These 17
colors have the following values:


Since when was orange part of the original 16 keyword colours for HTML 4.0 :D

Rick Bull
11-28-2002, 10:01 AM
And how come they've dropped some stuff like uris for the cursor property, and text-shadow. I know text-shadow isn't support any browser, but why drop URI for cursors? :confused: I think they're just keeping themselves in jobs ;)

gil davis
11-28-2002, 10:03 AM
Some time ago, Crayola decided to change the name of one of their colors from "flesh" to "peach".

Typically, browsers support many more than those 17 colors. Since the W3C is a "committee", maybe there were some Alputanovanites on the committee whose skin color is #FF8000. :D

You don't design by committee; you design by people who know what the h*** they're doing.

Committee designs are overly complex and lack a common architectural vision.

Stefan
11-28-2002, 10:18 AM
Originally posted by Rick Bull
And how come they've dropped some stuff like uris for the cursor property, and text-shadow. I know text-shadow isn't support any browser, but why drop URI for cursors? :confused: I think they're just keeping themselves in jobs ;)

Yes, some of the things they removed strike me as a bit odd.

Another thing is the uri for content in :before and :after which I think could be highly useful in the future when browsers start implementing it.

Robert Wellock
11-28-2002, 02:25 PM
Yes, I know Gilbert I was trying to figure out why the 16 colour keywords (not the hexadecimal or RGB values) as defined in the HTML Technical Recommendations mutated in 17, in this Working Draft making me wonder if it was a major typographical error.

Actually it's possible the "Frobozz Magic CSS Crayon Colouring Company" now steers the group... I never did ask Opera Software why they had issues with CSS Orange early this year, because it was obvious you'd use Hex or RGB.

So now when I write: p { color : orange; } and it goes, black it would relate to a bug with the browser.

gil davis
11-28-2002, 05:25 PM
My favorite is a Netscape-ism (4.x). They couldn't decide whether to use British or American spelling, so they have a "GRAY" and a "LIGHTGREY". :D

If you use "GREY", you get a very strange shade of green.

spufi
12-05-2002, 11:20 PM
Since I asked about the target attribute in 4.01 Strict in another thread, I'll add my thoughts here. At one point I thought opening a new window was pointless. Then I saw it used on a site for external links. Somehow this started to make more sense, if you were willing to just use it for that purpose. This way a person could be knee deep in a second site and all they would have to do is exit the second site and they would be right back to where they were at your site. So, I do see some use for it, but me being my anal self about sticking with standards, I've already removed the target attribute.