View Full Version : HTML 4.01 Strict
ShMiL
03-06-2003, 05:41 PM
There's no target attribute for the anchor tag in the strict DTD.
Is there something else within this DTD which does the same as the target attribute?
Thanks.
Vladdy
03-06-2003, 05:47 PM
Opening new browser windows is the task of operating system.
The point of Strict HTML and XHTML is to stay within the confines of a browser window to make it compatible with non-windowed environments (such as WebTV for example).
The only way to beat the system (which I do not advocate, mind you) is to rely on javascript.
ShMiL
03-06-2003, 06:38 PM
Thanks.
I'll use JS...
brothercake
03-06-2003, 07:18 PM
It's a tricky one this; I agree with what Vladdy's saying, but of course the powers that be (who pay my wages) insist on off-site links being in a new window.
I went with js-intercerption in the end, with a generic "a.onclick = function to retarget" kind of thing
sherill
03-07-2003, 01:55 AM
You can use the rel attribute.
More here:
http://www.sitepoint.com/article.php/1041
ronaldb66
03-07-2003, 07:55 AM
You can use the rel attribute.
Yeah, but that doesn't do anything; the author of that article still relies on javascript and, basically, the illegal target attribute, only this timenot directly so the code validates, but through the back door.
ShMiL
03-07-2003, 09:58 AM
It is a backdoor, but a smart one.
It has few advantages besided of the ones mentioned in the 3rd page of the article (http://www.sitepoint.com/article/1041/3)...
brothercake
03-07-2003, 11:14 AM
Definitely a graceful answer the problem - essentially the same as what I was doing, except using the "rel" attribute where I was using a look-up table of hrefs.
All the same; I personally feel that we would do well to abandon the idea of window manipulation, as much as is practical. The accessibility guidelines are very clear about this - do not open links in a new window, because it casues confusion and navigation problems.
ShMiL
03-07-2003, 09:29 PM
I didn't want to open a new topic since this question has something to do with the strict DTD (but not to target attribute)...
I tried to run a w3c validation check on my page and got this strange error:
cannot generate system identifier for general entity "forumid"
on this:
<a href="?page=2&forumid=1">Next 25 topics</A>
(and a pointer pointing to the "f" of "forumid")
and some similar errors for this link.
I tried to put the name of the page before the question mark - in case that was the problem... But it didn't work...
brothercake
03-07-2003, 10:12 PM
you're actually supposed to use entities for ampersand, even in query strings.
If you use & amp it should validate
ShMiL
03-07-2003, 10:20 PM
I don't understand...
What should I use?
brothercake
03-07-2003, 10:46 PM
oh well I don't know how to do entities in the forum without them being parsed ... but you need to go
<a href="?page=2& amp ;forumid=1">
but without the spaces ..
Eddyd84
03-07-2003, 11:07 PM
oh well I don't know how to do entities in the forum without them being parsed
I hope I do this right.
<a href="?page=2&amp;forumid=1">
<edit>It worked! Hurray!</edit>
For the forum, just type the the & code like this &amp;some_entity;
:thumbsup:
ShMiL
03-08-2003, 07:31 AM
OH
OK!
I didn't know that it works for url's too...
Thanks!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.