View Full Version : Why is validation making me work harder?
BLiZZaRD
12-19-2007, 04:31 PM
So I want a text link on my page. I also want it to open a new window instead of covering up my lovely site. Used to, you could use target="_blank" and all was dandy.
You still can, as it works everywhere.
But if you try to validate.. NO-NO! Says "they"!
Why not? Now to open an external link in a new window I have to write a new excerpt for the "rel" attribute, and then 7 lines of JS for it to work? Just to validate?
C'mon! There IS an easier, valid way, isn't there?
djr33
12-19-2007, 04:34 PM
I don't *think* that's invalid. It might be something else in the code near it which doesn't allow that.
BLiZZaRD
12-19-2007, 04:46 PM
Nope, the target attribute is not XHTML or HTML4.01 strict valid any longer...
C'mon! There IS an easier, valid way, isn't there?Of course there is:
<a href="somepage.html" onclick="return !open(this.href);">However, the target attribute was removed because they believe you should leave it up to the user which links open where, a sentiment with which I happen to agree.
djr33
12-19-2007, 06:15 PM
I hate validation like this.
You get around it using Javascript which may not work, but using the target attribute will.
People may abuse the target attribute, and I hate them for it, because that means that now I can't, if I have good reason.
It's ridiculous to not have a target="_blank" option. Forcing the same window or dealing with frames may be not needed, but opening in a new window is a very important function of many pages.
A page with a form that you filled out.... click a link... oops, now it all went away so you can read the FAQ first, etc.
BLiZZaRD
12-19-2007, 06:41 PM
Thanks Twey for the insight, I knew there had to be something.
I know of the reason, but really, how many people out there really know what is best for their browsing experience.
Not only is it a marketing technique, it is also the web designers point. You come to my site to look at cars to buy, I have 4 you are interested in, and I have contact info for the sellers, (or whatever) open the contact in a new window/page or the user forgets which one he is currently calling about.
I have external links to DD and Twey's site, but I don't want you to get lost over there and never find my site again. You go to Twey's site for a minute and you are 40 pages in. OKay, had my eyeful, now where was that riddle site? Back button, back button, back button... OR... close the window Twey's site was in.
djr33
12-19-2007, 06:47 PM
When you change sites, it's nice if it opens in a new window. For example, browsing a forum and clicking a link. This is especially true on a connection that may take some time to reload.
I have external links to DD and Twey's site, but I don't want you to get lost over there and never find my site again.So middle-click/control-click/alt-click/whatever-click it so it opens in a new window/tab.
BLiZZaRD
12-19-2007, 07:14 PM
or... just click.
djr33
12-19-2007, 07:18 PM
Many users don't know to do that, and I sometimes don't because I expect the site has it setup like that, only to find I've just lost the form I was willing in, etc.
I've started doing it habitually myself now, because you can't really trust sites to do it...
BLiZZaRD
12-19-2007, 07:24 PM
I usually just right click and choose open in new tab... that has become my habit.
BLiZZaRD
01-02-2008, 01:40 PM
Here's another validation issue..
Since when is language not valid code?
<script language="javascript" type="text/javascript">
Reports: "there is no attribute "LANGUAGE"."
on w3.org validator, this is the only one that reports. vbscript doesn't complain about the language usage. ( <script language="vbscript"... )
However, Total Validator complains about all of them.
So what now?
And again, it hasn't been valid (deprecated for type) since HTML 4.
<script language="vbscript"You have got to be kidding me.
BLiZZaRD
01-02-2008, 03:15 PM
So I should use <script type="text/javascript"> only? I haven't seen that before. (Haven't looked either).
You have got to be kidding me.
Trying something a little different, so technically, no I am not kidding you:
<script language="vbscript" type="text/vbscript">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0
set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable("$version")
end if
VBGetSwfVer = swVersion
End Function
// -->
Heh...
So I should use <script type="text/javascript"> only?Yes.
Trying something a little different, so technically, no I am not kidding you::eek:
BLiZZaRD
01-02-2008, 04:38 PM
Thanks Twey, that works!
As for the VB thing, don't worry, it won't stay, just testing a few things with JS disabled.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.