XHTML validation with target="..."

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

XHTML validation with target="..."

Post by Chris Corbyn »

Code: Select all

.com/&quote; target=&quote;_blank&quote;><img class=&quote;port
This doesn't validate with XHTML strict. Short of Javascript or opening in the same window is there an alternative?
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

There is already a perfect article on that exact topic: New-Window Links in a Standards-Compliant World

The short answer is NO, without using javascript or other methods, you cannot open new windows and be compliant. The standard chooses to remove that ability because it is frequently abused and breaks the document browsing model. If you disagree, you can use js, or not be compliant. :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Thanks Roja.

I'll keep it compliant. I'll just have the page open in the same window :D

I shall have a read of that article now too.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

That article covers it very well thanks again. I shall start putting rel to good use now too.

One thing that makes me laugh however is the site containing the article about w3c compliancy for new windows actually has popups which launch when you click the page numbers for the articles, and contains 35 XHTML 1.0 validation errors :lol:
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

d11wtq wrote:That article covers it very well thanks again. I shall start putting rel to good use now too.

One thing that makes me laugh however is the site containing the article about w3c compliancy for new windows actually has popups which launch when you click the page numbers for the articles, and contains 35 XHTML 1.0 validation errors :lol:
Yeah, tell me about it..

Its right up there with slashdot articles on compliance when they arent even *HTML* compliant. Pitiful.

Of course, as someone that runs (many) phpbb forums, I'm the first to say how much I hate trying to fix the html compliance issues in it. It REALLY gets tedious.

Good compliance seems to be harder and harder to obtain, the more indepth the design. :)
Post Reply