There is no attribute “target” w3c error experience.
I have a habit with my blogs, about once or twice a month, I checked the validation in w3c. With this blog, I have checked almost once a week or sometimes more often, depends on how often i modify some stuff.
My another experience with validating wordpress code is with Thesis theme.
I choose Thesis is the best SEO theme for wordpress, one of the reason is it has clean code, therefore it is validated in W3C validator. (see more about how to validate wordpress in w3c post)
The great thing with Thesis is also it has XTML strict, which is good, but harder to learn.
Thing was i wanted to put “target:_blank” on my link, and i checked the validator, the result is there is no attribute “target” error message.
There is no attribute “target” XHTML Strict and Transitional.
This blog uses XHTML Transitional, therefore i can use the code: target=”_blank”. But Thesis theme is using XHTML strict, this is why we can’t use target=”_blank” otherwise it will end to there is no attribute “target” in w3c validator website.
I choose to learn XHTML transitional since it is not so difficult and has less rules than the strick ones. Transitional is easier to learn for beginners, like myself.
The benefit of having XHTML strick is it makes visitors browsers to renders our sites more strict, means it improves accessability of your site, by visitors, and search engines bots.
There is no attribute “target” w3c error fix.
If you use Thesis or other XHTML strict document, there are some attributes that you can’t use, but allowed in transitional.
For example, in my case, i wanted to validate the target=”_blank” but got there is no attribute “target” error notification.
The error screenshot:
How to fix? it is actually not complicated, after doing researches in some forums, I found this code is validated to replace:
onclick="target='_blank';"
So example: you want to type: <a href=”#” target=”_blank”> in XHTML strict, you will have to modify that code to:
<a href=”#” onclick=”target=’_blank’”>
It can be tricky sometimes.
That’s how I fix my there is no attribute “target” error notification invalid message in w3c.
We commonly use target=”_blank” attribute in our source codes to make links open in new window. Quite usual practice right? but guess what, strict doctype don’t like it.
If you’ve set the doctype DTD to be html strict, it will give error on target attribute saying there is no attribute “target”.
So what’s the solution to it? yeah definitely, change the doctype from strict to transitional (or stop using target attribute!)
One more option is to remove the target attribute and set the links to open in new window via javascript, but anyway out of the scope of this post.
Coming back to the point, how to change the dtd to html transitional.
How to fix There is no attribute “target” – w3 validation error for HTML Strict
Simply, open your html source file (if you’re using theme of wordpress, goto header.php and find the dtd code on top) saying something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
and change it to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Save your file and run the validator again.
Let me know if you have any trouble while fixing the there is no attribute “target” error while validating your html site.
There is no attribute “target” w3c error experience.
I have a habit with my blogs, about once or twice a month, I checked the validation in w3c. With this blog, I have checked almost once a week or sometimes more often, depends on how often i modify some stuff.
My another experience with validating wordpress code is with Thesis theme.
I choose Thesis is the best SEO theme for wordpress, one of the reason is it has clean code, therefore it is validated in W3C validator. (see more about how to validate wordpress in w3c post)
The great thing with Thesis is also it has XTML strict, which is good, but harder to learn.
Thing was i wanted to put “target:_blank” on my link, and i checked the validator, the result is there is no attribute “target” error message.
There is no attribute “target” XHTML Strict and Transitional.
This blog uses XHTML Transitional, therefore i can use the code: target=”_blank”. But Thesis theme is using XHTML strict, this is why we can’t use target=”_blank” otherwise it will end to there is no attribute “target” in w3c validator website.
I choose to learn XHTML transitional since it is not so difficult and has less rules than the strick ones. Transitional is easier to learn for beginners, like myself.
The benefit of having XHTML strick is it makes visitors browsers to renders our sites more strict, means it improves accessability of your site, by visitors, and search engines bots.
There is no attribute “target” w3c error fix.
If you use Thesis or other XHTML strict document, there are some attributes that you can’t use, but allowed in transitional.
For example, in my case, i wanted to validate the target=”_blank” but got there is no attribute “target” error notification.
The error screenshot:
How to fix? it is actually not complicated, after doing researches in some forums, I found this code is validated to replace:
onclick="target='_blank';"
So example: you want to type: <a href=”#” target=”_blank”> in XHTML strict, you will have to modify that code to:
<a href=”#” onclick=”target=’_blank’”>
It can be tricky sometimes.
That’s how I fix my there is no attribute “target” error notification invalid message in w3c.
We commonly use target=”_blank” attribute in our source codes to make links open in new window. Quite usual practice right? but guess what, strict doctype don’t like it.
If you’ve set the doctype DTD to be html strict, it will give error on target attribute saying there is no attribute “target”.
So what’s the solution to it? yeah definitely, change the doctype from strict to transitional (or stop using target attribute!)
One more option is to remove the target attribute and set the links to open in new window via javascript, but anyway out of the scope of this post.
Coming back to the point, how to change the dtd to html transitional.
How to fix There is no attribute “target” – w3 validation error for HTML Strict
Simply, open your html source file (if you’re using theme of wordpress, goto header.php and find the dtd code on top) saying something like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
and change it to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Save your file and run the validator again.
Let me know if you have any trouble while fixing the there is no attribute “target” error while validating your html site.
-
djixas
Well-Known Member
- Messages:
- 749
- Likes Received:
- 12
- Best Answers:
- 0
- Trophy Points:
- 110
#1
I have one error left which drives me crazy.
This page is not Valid HTML 4.01 Strict!
Error Line 12 column 81: there is no attribute «TARGET».
...n.com" title="Site Main Page" target="_blank" class="topnav">Home Page</a><a h
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the «Strict» document type with a document that uses frames (e.g. you must use the «Transitional» document type to get the «target» attribute), or by using vendor proprietary extensions such as «marginheight» (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
————————————
How the …. I can fix it? Without using javascript.
-
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#2
Damned straight it’s not supported — it was removed because forcing links to open in a new window is impolite to the user. In fact it’s a behavior that royally torques me off.
If I want to open the link in a new window, I’ll do it manually (actually, I’d probably just middle click) — Forcing the user to have no choice BUT to open in a new window? Bad form.
How to fix? REMOVE THE TARGET DECLARATION. It’s obnoxious, it’s annoying, GET RID OF IT.
Sorry… pet peeve. Much akin to the classic «Download NOW» link that you have to jump through four pages just to get to the actual malfing download… which ends up relying on a broken javascript timer with no manual link should that /FAIL/
-
smg
Well-Known Member
- Messages:
- 599
- Likes Received:
- 16
- Best Answers:
- 0
- Trophy Points:
- 130
#3
You could always try using a javascript link
-
Dan Schulz
Peon
- Messages:
- 6,032
- Likes Received:
- 436
- Best Answers:
- 0
- Trophy Points:
- 0
#4
Deathshadow’s right. Fortunately there is a way around it using the DOM and some scripting.
http://accessify.com/features/tutorials/the-perfect-popup/ -
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#5
As deathshadow says, it’s impolite to decide for the visitor that you’re going to force a new instance of his browser. I’m not so adamantly opposed when the new window is actually helpful, such as opening a small help file to aid the visitor in whatever he’s trying to accomplish on the page he’s in, or maybe an enlarged version of some thumbnail image, that aids your visitor.
It is a behavior, which belongs in scripting. The scripting must be unobtrusive, adding the behavior on top of the default—an enhancement.
For the links you think will help the visitor if they open a new window, do this:
<a href="some.html" [color=red]rel="external"[/color]>Somewhere</a>
Now a bit of javascript in an external file or in the head.
window.onload = function() { setLinks(); } function setLinks() { if (!document.getElementsByTagName) return false; var links = document.getElementsByTagName("a"); if (links.length == 0) return false; for (var i = 0; i < links.length; i++) { var relation = links[i].getAttribute("rel"); if (relation == "external") { links[i].onclick = function() { return !window.open(this.href); } } } }
It’s still possibly impolite, but it is unobtrusive and it fails gracefully.
cheers,
gary
-
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#6
And, what happens if the visitor does not have javascript activated, or the UA doesn’t do javascript? The link is permanently broken. Using a javascript link is a singularly Bad Idea.
cheers,
gary
-
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#7
Which is why Lightboxes are a total /FAIL/, as that sure as shine ain’t no enhancement. First thing I do on sites with them is turn javascript off… somehow clicking on a thumbnail on my broadband connected computer and having a 20k image take longer to appear than it would on DIALUP isn’t real high up on my want list.
Too much ‘aint it neat’ scripting out there which ends up costing functionality instead of adding it.
-
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#8
So what are you going on about? There are occasions where opening a new window can be desirable from the user’s standpoint. As I pointed out, the javascript is added on top of the basic functionality. If you turn your js off, the link still works in the traditional manner. This ain’t no ‘ain’t it neat’ bit of scripting. Are you not paying attention?
gary
-
x-noise
Peon
- Messages:
- 35
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
#9
you could use javascript in combination with classes. select all the links in the page that have the class lets say «external», and add them a target:blank. in this manner your code will be clean, and you stii control the elements. The advantage is that the link is not broken if user does not have js enabled or the UA does not support JS.
Btw: in css3 there will be a property that can control the way a link opens.
-
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#10
Yes, a class could be used and would be friendlier toward IE which doesn’t allow attribute based selectors, a la a[rel=»external»] {} as a styling hook. The rel attribute would be more semantic, but no harm in helping the lame and the halt (IE).
Adding the target attribute via javascript is still adding an invalid attribute—though the validator won’t catch it. Attaching an anonymous window.open() onclick event handler is more appropriate.
Notice that any failure by the javascript causes the normal link to fire.
N.B. It appears that html5 may bring back the target attribute.
cheers,
gary
-
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#11
in which case let the user CHOOSE instead of cramming it down their throat… or making them change their browser behavior because they don’t like it.
Good rule of thumb — anything that changes the expected behavior of a link… is PROBABLY not a good idea and is more likely to piss off the user than add any sort of ‘functionality’.
Take scripted download que’s… Seriously, have you EVER been on a site that had those you didn’t curse to the nine hells? I get that way every time a link opens in a behavior different from normal… ‘for **** sake just show me the image’, ‘for **** sake why did this open a new window’ and of course ‘for **** sake just let me download the damned file!’
But then I do tend to middle click on things more than left click these days.
-
djixas
Well-Known Member
- Messages:
- 749
- Likes Received:
- 12
- Best Answers:
- 0
- Trophy Points:
- 110
#12
Well… Basically I was planning to add _blank only for links, which I sold… I think it would even be better for users.
As far as I can see, there are three options:
1. Remove _blank
2. Use JavaScript
3. Use Transitional instead of StrictI will pick 4th one: ignore this crazy error
-
Els1
Guest
- Messages:
- 811
- Likes Received:
- 16
- Best Answers:
- 0
- Trophy Points:
- 0
#13
gl fixing the problem i know how it feels getting errors and more errors
-
djixas
Well-Known Member
- Messages:
- 749
- Likes Received:
- 12
- Best Answers:
- 0
- Trophy Points:
- 110
#14
I get this error only now. But seems Safari and Konquer renders site wrong… Will have to do some stuff then…
-
youngdek
Peon
- Messages:
- 53
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
-
trichnosis
Prominent Member
- Messages:
- 13,785
- Likes Received:
- 333
- Best Answers:
- 0
- Trophy Points:
- 300
#16
i get the same problem and i have removed target tag from my links
-
Stomme poes
Peon
- Messages:
- 3,195
- Likes Received:
- 136
- Best Answers:
- 0
- Trophy Points:
- 0
#17
To my great shame, I have not one but two pages on a site that have dropped down to Transitional for target. I hate target, but there was no other way around it. The rest of the site is HTML4.01 Strict, but that doesn’t make me feel any better.
In 99% of all cases (this is including Flash banners with a clickie button layer on top), target should be removed. No, the client does not «stay on your page.» They leave it, with just an open window that they’ll close when they’re done surfing and discover that they have to close their browser 5 times. -
subduedjoy
Peon
- Messages:
- 1
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
#18
When a link goes to another domain, it should open in a new page so that users will be able to find the original site if they click out of the linked-to site. It’s a pet peeve of mine when an off-site link does not open in a new page. I often click out of the linked-to site, and can not find the original one. Sometimes, depending on how I got to the original site to begin with, it is not in my history. So I can’t find it so easily. The Ugh with having to click out of two sites is far less than the Ugh of having to find the original site. Plus, I always let the user know ahead of time that the link will open in a new page by providing a window icon next to the link. The user can then decide whether or not he/she wants to click on the link.
-
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#19
Two year bump… JOY!Funny, I have the exact opposite pet peeve — but then I know how to middle click, ctrl-click, and know how to hit ‘back’ in my browser, and use a browser that has no ‘history problems’ you seem to be claiming..Then you are using one ****ed up browser buddy. Either that or you are on some garbage site where some nimrod decided AJAX emulating frames was a better choice than real links and separate pages — which it isn’t.Not a problem here, if I care about the original site, I go back to it’s tab… or hit ‘back’. Yeah, and what if we want to click on it WITHOUT going to a tab/window? Using «target» or javascript asshattery doesn’t even give the user the CHOICE.
Target is a complete bullshit attribute meant for framesets and nothing else — abusing it for functionality already built into browsers; that’s just stupid.
-
Darden12
Well-Known Member
- Messages:
- 107
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 101
#20
I understand why you say forcing new window is impolite, but then how do you handle the following case without forcing a new window:
You have a Net radio station (in this case Live365) widget on your page: If someone clicks on another link on your page WHILE they’re listening to your station through the widget, then the station will stop playing.
Log in to view your Analytics, AdSense & PayPal stats
I have been using git-repo
for a while and I noticed that quite often it fails to clone a repository.
It outputs:
Fatal error: 'GitRepoRunner' object has no attribute 'target'
The thing is that if you try running command again — it may fail again. Or work. This was totally random, but luckily I managed to figure it out.
To start with, git-repo
uses KeywordArgumentParser
to parse command line params. It iterates over all args using for arg, value in self.args.items()
. However, we need to remember that self.arg.items()
is not ordered. So we process args in random order.
Because of that, sometimes we process <namespace>/<repo>
parameter before <target>
parameter, sometimes after. And in cases when we process <namespace>/<repo>
before <target>
we have the issue.
<namespace>/<repo>
arg is proccessed by set_repo_slug
in repo.py
. This function uses self.target
value: service = RepositoryService.get_service(None, self.target)
. And that’s the problem. If the <target>
was not parsed before <namespace>/<repo>
we get an error here.
So there are two possible solutions:
- Change
set_repo_slug
so it doesn’t useself.target
anywhere. - Ensure somehow that
<target>
is always processed before<namespace>/<repo>
Note: The problem occurs on python3.5 and below only. There are no problem on python3.6 as dictionaries are ordered there
Error Line 12 column 81: there is no attribute «TARGET».
...n.com" title="Site Main Page" target="_blank" class="topnav">Home Page</a><a h
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the «Strict» document type with a document that uses frames (e.g. you must use the «Transitional» document type to get the «target» attribute), or by using vendor proprietary extensions such as «marginheight» (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
————————————
How the …. I can fix it? Without using javascript.
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#2
Damned straight it’s not supported — it was removed because forcing links to open in a new window is impolite to the user. In fact it’s a behavior that royally torques me off.
If I want to open the link in a new window, I’ll do it manually (actually, I’d probably just middle click) — Forcing the user to have no choice BUT to open in a new window? Bad form.
How to fix? REMOVE THE TARGET DECLARATION. It’s obnoxious, it’s annoying, GET RID OF IT.
Sorry… pet peeve. Much akin to the classic «Download NOW» link that you have to jump through four pages just to get to the actual malfing download… which ends up relying on a broken javascript timer with no manual link should that /FAIL/
smg
Well-Known Member
- Messages:
- 599
- Likes Received:
- 16
- Best Answers:
- 0
- Trophy Points:
- 130
#3
You could always try using a javascript link
Dan Schulz
Peon
- Messages:
- 6,032
- Likes Received:
- 436
- Best Answers:
- 0
- Trophy Points:
- 0
#4
Deathshadow’s right. Fortunately there is a way around it using the DOM and some scripting.
http://accessify.com/features/tutorials/the-perfect-popup/
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#5
As deathshadow says, it’s impolite to decide for the visitor that you’re going to force a new instance of his browser. I’m not so adamantly opposed when the new window is actually helpful, such as opening a small help file to aid the visitor in whatever he’s trying to accomplish on the page he’s in, or maybe an enlarged version of some thumbnail image, that aids your visitor.
It is a behavior, which belongs in scripting. The scripting must be unobtrusive, adding the behavior on top of the default—an enhancement.
For the links you think will help the visitor if they open a new window, do this:
<a href="some.html" [color=red]rel="external"[/color]>Somewhere</a>
Now a bit of javascript in an external file or in the head.
window.onload = function() { setLinks(); } function setLinks() { if (!document.getElementsByTagName) return false; var links = document.getElementsByTagName("a"); if (links.length == 0) return false; for (var i = 0; i < links.length; i++) { var relation = links[i].getAttribute("rel"); if (relation == "external") { links[i].onclick = function() { return !window.open(this.href); } } } }
It’s still possibly impolite, but it is unobtrusive and it fails gracefully.
cheers,
gary
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#6
And, what happens if the visitor does not have javascript activated, or the UA doesn’t do javascript? The link is permanently broken. Using a javascript link is a singularly Bad Idea.
cheers,
gary
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#7
Which is why Lightboxes are a total /FAIL/, as that sure as shine ain’t no enhancement. First thing I do on sites with them is turn javascript off… somehow clicking on a thumbnail on my broadband connected computer and having a 20k image take longer to appear than it would on DIALUP isn’t real high up on my want list.
Too much ‘aint it neat’ scripting out there which ends up costing functionality instead of adding it.
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#8
So what are you going on about? There are occasions where opening a new window can be desirable from the user’s standpoint. As I pointed out, the javascript is added on top of the basic functionality. If you turn your js off, the link still works in the traditional manner. This ain’t no ‘ain’t it neat’ bit of scripting. Are you not paying attention?
gary
x-noise
Peon
- Messages:
- 35
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
#9
you could use javascript in combination with classes. select all the links in the page that have the class lets say «external», and add them a target:blank. in this manner your code will be clean, and you stii control the elements. The advantage is that the link is not broken if user does not have js enabled or the UA does not support JS.
Btw: in css3 there will be a property that can control the way a link opens.
kk5st
Prominent Member
- Messages:
- 3,499
- Likes Received:
- 377
- Best Answers:
- 29
- Trophy Points:
- 335
#10
Yes, a class could be used and would be friendlier toward IE which doesn’t allow attribute based selectors, a la a[rel=»external»] {} as a styling hook. The rel attribute would be more semantic, but no harm in helping the lame and the halt (IE).
Adding the target attribute via javascript is still adding an invalid attribute—though the validator won’t catch it. Attaching an anonymous window.open() onclick event handler is more appropriate.
Notice that any failure by the javascript causes the normal link to fire.
N.B. It appears that html5 may bring back the target attribute.
cheers,
gary
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#11
in which case let the user CHOOSE instead of cramming it down their throat… or making them change their browser behavior because they don’t like it.
Good rule of thumb — anything that changes the expected behavior of a link… is PROBABLY not a good idea and is more likely to piss off the user than add any sort of ‘functionality’.
Take scripted download que’s… Seriously, have you EVER been on a site that had those you didn’t curse to the nine hells? I get that way every time a link opens in a behavior different from normal… ‘for **** sake just show me the image’, ‘for **** sake why did this open a new window’ and of course ‘for **** sake just let me download the damned file!’
But then I do tend to middle click on things more than left click these days.
djixas
Well-Known Member
- Messages:
- 749
- Likes Received:
- 12
- Best Answers:
- 0
- Trophy Points:
- 110
#12
Well… Basically I was planning to add _blank only for links, which I sold… I think it would even be better for users.
As far as I can see, there are three options:
1. Remove _blank
2. Use JavaScript
3. Use Transitional instead of StrictI will pick 4th one: ignore this crazy error
![]()
Els1
Guest
- Messages:
- 811
- Likes Received:
- 16
- Best Answers:
- 0
- Trophy Points:
- 0
#13
gl fixing the problem i know how it feels getting errors and more errors
djixas
Well-Known Member
- Messages:
- 749
- Likes Received:
- 12
- Best Answers:
- 0
- Trophy Points:
- 110
#14
I get this error only now. But seems Safari and Konquer renders site wrong… Will have to do some stuff then…
youngdek
Peon
- Messages:
- 53
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
trichnosis
Prominent Member
- Messages:
- 13,785
- Likes Received:
- 333
- Best Answers:
- 0
- Trophy Points:
- 300
#16
i get the same problem and i have removed target tag from my links
Stomme poes
Peon
- Messages:
- 3,195
- Likes Received:
- 136
- Best Answers:
- 0
- Trophy Points:
- 0
#17
To my great shame, I have not one but two pages on a site that have dropped down to Transitional for target. I hate target, but there was no other way around it. The rest of the site is HTML4.01 Strict, but that doesn’t make me feel any better.
In 99% of all cases (this is including Flash banners with a clickie button layer on top), target should be removed. No, the client does not «stay on your page.» They leave it, with just an open window that they’ll close when they’re done surfing and discover that they have to close their browser 5 times.
subduedjoy
Peon
- Messages:
- 1
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 0
#18
When a link goes to another domain, it should open in a new page so that users will be able to find the original site if they click out of the linked-to site. It’s a pet peeve of mine when an off-site link does not open in a new page. I often click out of the linked-to site, and can not find the original one. Sometimes, depending on how I got to the original site to begin with, it is not in my history. So I can’t find it so easily. The Ugh with having to click out of two sites is far less than the Ugh of having to find the original site. Plus, I always let the user know ahead of time that the link will open in a new page by providing a window icon next to the link. The user can then decide whether or not he/she wants to click on the link.
deathshadow
Acclaimed Member
- Messages:
- 9,673
- Likes Received:
- 1,988
- Best Answers:
- 251
- Trophy Points:
- 515
#19
Two year bump… JOY!Funny, I have the exact opposite pet peeve — but then I know how to middle click, ctrl-click, and know how to hit ‘back’ in my browser, and use a browser that has no ‘history problems’ you seem to be claiming..Then you are using one ****ed up browser buddy. Either that or you are on some garbage site where some nimrod decided AJAX emulating frames was a better choice than real links and separate pages — which it isn’t.Not a problem here, if I care about the original site, I go back to it’s tab… or hit ‘back’. Yeah, and what if we want to click on it WITHOUT going to a tab/window? Using «target» or javascript asshattery doesn’t even give the user the CHOICE.
Target is a complete bullshit attribute meant for framesets and nothing else — abusing it for functionality already built into browsers; that’s just stupid.
Darden12
Well-Known Member
- Messages:
- 107
- Likes Received:
- 0
- Best Answers:
- 0
- Trophy Points:
- 101
#20
I understand why you say forcing new window is impolite, but then how do you handle the following case without forcing a new window:
You have a Net radio station (in this case Live365) widget on your page: If someone clicks on another link on your page WHILE they’re listening to your station through the widget, then the station will stop playing.
Log in to view your Analytics, AdSense & PayPal stats
I have been using git-repo
for a while and I noticed that quite often it fails to clone a repository.
It outputs:
Fatal error: 'GitRepoRunner' object has no attribute 'target'
The thing is that if you try running command again — it may fail again. Or work. This was totally random, but luckily I managed to figure it out.
To start with, git-repo
uses KeywordArgumentParser
to parse command line params. It iterates over all args using for arg, value in self.args.items()
. However, we need to remember that self.arg.items()
is not ordered. So we process args in random order.
Because of that, sometimes we process <namespace>/<repo>
parameter before <target>
parameter, sometimes after. And in cases when we process <namespace>/<repo>
before <target>
we have the issue.
<namespace>/<repo>
arg is proccessed by set_repo_slug
in repo.py
. This function uses self.target
value: service = RepositoryService.get_service(None, self.target)
. And that’s the problem. If the <target>
was not parsed before <namespace>/<repo>
we get an error here.
So there are two possible solutions:
- Change
set_repo_slug
so it doesn’t useself.target
anywhere. - Ensure somehow that
<target>
is always processed before<namespace>/<repo>
Note: The problem occurs on python3.5 and below only. There are no problem on python3.6 as dictionaries are ordered there
I got another error about the target=»_blank» as it said
Line 40, column 12: there is no attribute «TARGET»
target=»new»>View the photo of the ABCoA; building here</a>.<br>
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the «Strict» document type with a document that uses frames (e.g. you must use the «Transitional» document type to get the «target» attribute), or by using vendor proprietary extensions such as «marginheight» (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.
where the code is
- Code: Select all
<a class="aLink1" href="images/ABCoA_Bldg_Photo.jpg" target="_blank">View the photo of the ABCoA&U+2122 building here</a>
Thanks…
Posted April 26th, 2005, 2:51 pm
There is no attribute «target». Use a construct like this
- Code: Select all
<a class="aLink1" href="images/ABCoA_Bldg_Photo.jpg" onclick="window.open(this.href);return false;">View the photo of the ABCoA&U+2122 building here</a>
Posted April 26th, 2005, 2:57 pm
Ew.. More ugly coding to read, okay, I’ll fix it and live with it….
Also have another validator error about
- Code: Select all
Please refer to the following maps to get more information or use <a class="aLink1" href="http://maps.google.com/maps?q=11246%20alumni%20way%20jacksonville%20florida%2032246&spn=0.033447%2C0.068500&hl=en">Street Map</a> to get directions.
where it say
Line 44, column 95: general entity «spn» not defined and no default entity
…way%20jacksonville%20florida%2032246&spn=0.033447%2C0.068500&hl=en»
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Line 44, column 98: reference to entity «spn» for which no system identifier could be generated
…%20jacksonville%20florida%2032246&spn=0.033447%2C0.068500&hl=en»
This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Line 44, column 94: entity was defined here
…0way%20jacksonville%20florida%2032246&spn=0.033447%2C0.068500&hl=en»
Line 44, column 119: cannot generate system identifier for general entity «hl»
…rida%2032246&spn=0.033447%2C0.068500&hl=en»
Line 44, column 119: general entity «hl» not defined and no default entity
…rida%2032246&spn=0.033447%2C0.068500&hl=en»
Line 44, column 121: reference to entity «hl» for which no system identifier could be generated
…da%2032246&spn=0.033447%2C0.068500&hl=en»
Line 44, column 118: entity was defined here
…orida%2032246&spn=0.033447%2C0.068500&hl=en»
So, I take it those are not allowed or something. So, what are the example of those string should I replace them with??
Thanks…
Posted April 26th, 2005, 3:01 pm
Replace & with & (or use the escape function of whatever server-side scripting you have available).
Posted April 26th, 2005, 3:06 pm
|
James |
|
Advanced Member
Group: Members
|
When I validate the HTML in my site using the WDG HTML Validator I get the following error on those pages with Level of HTML: HTML 4.01 Strict. Error: there is no attribute TARGET for this element (in this HTML version) I am used to using target=»_blank» when I want a linked new page to open up in a new browser screen, but apparently one cannot do that in HTML 4.01 Strict QUESTIONS: 1. Why is the attribute, «target», deleted from version 4.01 strict? I look forward to your advice. Kind regards, James |
|
|
lavazza |
|
Member
Group: Members Member No.: 3,191
|
QUOTE(James @ Jul 2 2007, 11:52 PM) 1. Why is the attribute, «target», deleted from version 4.01 strict? 1. It is to be ‘deprecated’ for a few reasons. The #1 in my book: it is really, really annoying! If you follow such a link and you have 30 tabs open, how do you get back to the page you were on? To me, it’s like inviting friends around, offerering them a coffee — and when they say yes, you beam them (Star Trek style) to a cafe on the other side of the world… with no map for them to get back |
|
|
James |
|
Advanced Member
Group: Members
|
QUOTE(lavazza @ Jul 2 2007, 08:50 PM) QUOTE(James @ Jul 2 2007, 11:52 PM) 1. Why is the attribute, «target», deleted from version 4.01 strict? 1. It is to be ‘deprecated’ for a few reasons. The #1 in my book: it is really, really annoying! If you follow such a link and you have 30 tabs open, how do you get back to the page you were on? To me, it’s like inviting friends around, offerering them a coffee — and when they say yes, you beam them (Star Trek style) to a cafe on the other side of the world… with no map for them to get back Thanks for that information I can see your point about opening links in new browsers. However, I only every go one level up in that direction. For example, I will have a link to our local government page so non-locals can browse that site for information. Using the «target» attribute I can advise my visitors to simply close the page to return to my site. How would you suggest they find their way back from an outside site if we don’t use the target attribute? — I suppose they could use the back button, clicking on it once for every page they looked at on the government site. I read the «Choosing a DOCTYPE» article, thank you. It seems like «Strict» might augur well for well set out pages and longevity — do you agree? Many thanks, James |
|
|
pandy |
|
🌟Computer says no🌟
Group: WDG Moderators Member No.: 6
|
What if the user lets new windows open as tabs as lavazza does? Then the close the window and go back to the orignal page copncept doesn’t work. With Strict, if you must open a new window you do it with JavaScript. And you should do it the right way, with the URL in the href. |
|
|
pandy |
|
🌟Computer says no🌟
Group: WDG Moderators Member No.: 6
|
PLEASE, don’t double post! Threads merged. |
|
|
Darin McGrew |
|
WDG Member
Group: Root Admin
|
QUOTE(James @ Jul 2 2007, 04:50 AM) 1. Why is the attribute, «target», deleted from version 4.01 strict? The target attribute, like all other frame-related markup, is not available in the Strict DTDs. The reply mentioning XHTML is misleading. HTML vs XHTML is irrelevant. All that matters is Strict DTD vs Transitional DTD vs Frameset DTD. QUOTE(James @ Jul 2 2007, 04:50 AM) 2. With 4.01 Strict, how do I get a link to open in a new page? The best choice is to let your visitors open new windows on their own, if/when they want them. If you insist on doing it for them, then JavaScript is your only option with Strict. QUOTE(James @ Jul 2 2007, 04:50 AM) 3. What is the best version to use if one is currently building a site? — Strict? — or Transitional? What are you transitioning from? Do you have legacy documents that you’re still transitioning from tag-soup markup to standard markup? For personal work, I use a custom DTD that is a copy of Strict, with a couple changes to allow <base target=»_top»>. Elsewhere, I use Strict. |
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Banned
- Репутация: 12
- Webmoney BL:
?
Здравствуйте!
у меня на сайте найдено 3 ошибкb HTML. Как их исправить?# Line 354, Column 80: there is no attribute «role»
…dget_search»><h3>Поиск</h3><form role=»search» method=»get» id=»searchform» ac…
✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the «Strict» document type with a document that uses frames (e.g. you must use the «Transitional» document type to get the «target» attribute), or by using vendor proprietary extensions such as «marginheight» (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
# Error Line 354, Column 106: ID «searchform» already defined…><form role=»search» method=»get» id=»searchform» action=»http://seo-nayka.ru/…
✉
An «id» is a unique identifier. Each time this attribute is used in a document it must have a different value. If you are using this attribute as a hook for style sheets it may be more appropriate to use classes (which group elements) than id (which are used to identify exactly one element).
# Info Line 334, Column 16: ID «searchform» first defined here<form id=»searchform» action=»http://seo-nayka.ru/» method=»get»>
# Error Line 376, Column 8: there is no attribute «target»
target=»_blank» rel=»nofollow»><img src=»//bs.yandex.ru/informer/10693780/3_1_F…
✉
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the «Strict» document type with a document that uses frames (e.g. you must use the «Transitional» document type to get the «target» attribute), or by using vendor proprietary extensions such as «marginheight» (this is usually fixed by using CSS to achieve the desired effect instead).
This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.
How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.
За ранее огромное спасибо!!!