Page 1 of 1

XHTML validation with target="..."

Posted: Sun Mar 27, 2005 4:01 pm
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?

Posted: Sun Mar 27, 2005 4:48 pm
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. :)

Posted: Sun Mar 27, 2005 5:22 pm
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.

Posted: Sun Mar 27, 2005 5:32 pm
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:

Posted: Sun Mar 27, 2005 6:04 pm
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. :)