This is a discussion on "Validating target" within the Web Page Design section. This forum, and the thread "Validating target are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Validating target
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
HI;
I'm struggling with this very basic element. Can anyone help me? I'm using this code but it's not validating for XHTML 1.0 strict
Quote:
Last edited by Lchad; Jan 13th, 2007 at 19:32. Reason: typo |
|
|
|
|||
|
Re: Validating target
I dont think you can use target attributes in xhtml. You would have to use javascript instead
|
|
|||
|
Re: Validating target
Thanks crewdesign... your answer was just enough to get me going in the right direction.
I did a google search and came up with this article/tut if anyone is interested! You are right, Javascript is an option... Thanks |
|
||||
|
Re: Validating target
Here more info for you
Using JavaScript instead of target to open new windows And make sure you scroll to the bottom where it says "Possibly related posts" |
|
||||
|
Re: Validating target
Just thought I'd comment on these because I looked at both of the scripts. Lchad, the article you linked to is strange... It's basically using JavaScript to sidestep XHTML validation. It's tricking validators into thinking that there is no target attribute anywhere, when in reality, JS is placing them behind their backs.
Karinne's link provides a rather bloated script. I prefer this:
|
|
|||
|
Re: Validating target
Lets not forget that however you achieve it, a pop-up is still a pop-up and more and more people block them thanks to their constant abuse.
I strongly suggest that you rethink whether or not there is an alternative approach. A lot of people have used them on external links because they do not want the user to move away from their web site, but if the web site is good enough, they will come back. Also, consider the confusion it can cause for some people. Accessibility!!! |
|
|||
|
Re: Validating target
Well then what is a happy medium. There are instances where you need to offer a link to an outside source. What do you suggest?
|
|
|||
|
Re: Validating target
Just have your link to an outside source.
In the title attribute you can make reference to the fact that this is an external link along with other useful information. People will come back to your site if they want to. Don't force them to stay there. |
|
|||
|
Re: Validating target
Well I see your point. This is going to be a hard adjustment for me.
Does CSS3 have a target worked into it's code for the future? |
|
|||
|
Re: Validating target
I wouldn't expect it to because you are talking about an 'operational' attribute
and not a 'styling' attribute. |
|
||||
|
Re: Validating target
JavaScript is the only true behavioral part of a website, so it and pop ups go hand in hand.
Last edited by moojoo; Jan 16th, 2007 at 15:37. |
|
||||
|
Re: Validating target
I always have new windows etc open in tabs, so nomatter what you do I get a full size window with the content =P.
__________________
I've got <style> and .class
|
|
|||
|
Re: Validating target
moojoo what code do you use to open in new tabs?
|
|
||||
|
Re: Validating target
I believe moojoo is referring to firefox, which is a tabbed browser....download it, it is free, fast, and cool...lol
|
|
|||
|
Re: Validating target
oh... I see.. misunderstood... I have ff... LOL
|
![]() |
| Tags |
| html validator, link target |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Target _blank | Jack Franklin | Web Page Design | 12 | Oct 12th, 2007 09:55 |
| Target Window Name | jayaramgussy | Web Page Design | 9 | Sep 20th, 2007 22:44 |
| XHTML Target | JacobHaug | Web Page Design | 7 | Jan 4th, 2007 11:55 |
| Save Target As | VanderBOOM | JavaScript Forum | 4 | Dec 15th, 2005 10:25 |
| Frameset target help please | charter | Flash & Multimedia Forum | 4 | Mar 28th, 2004 10:05 |