Page 1 of 1

Specifying targets in strict documents

Posted: Sat Mar 12, 2005 11:13 am
by John Zeman
This is not directly related to CSE but since CSE alerted me to the problem, and since I have not had any luck so far finding the answer by searching the internet, I thought I'd post my question here in case anyone knows the answer.

Recently I made the decision to write all my new html documents in strict mode. No problems doing so until I added a

target="_blank"

attribute to an anchor element. CSE (and every other validator I've tried) tells me targets are not allowed in strict documents. Ok that's fine, but what is the equivalent way of specifying a target then? It's not a frames site, all I want to do is to open a link to another web site in a new window in strict mode.

If anyone has the answer, I'd appreciate hearing it.

Thanks,

John

Posted: Sat Mar 12, 2005 12:04 pm
by John Zeman
Never mind, I finally found the answer here:

http://www.sitepoint.com/article/standa ... iant-world

John

Posted: Fri Jan 16, 2009 9:21 am
by Dwight_Stegall
To me that whole article is ridiculous. Target="_blank" cannot be turned off but Javascript's window.open can. Why use something that can be disabled? Besides doing it the JavaScript way takes way more code and slows your page loading down. Surely they can find better ways to waste our time?

Re: Specifying targets in strict documents

Posted: Fri Jan 16, 2009 11:56 am
by Lou
Dwight_Stegall wrote:To me that whole article is...
Yes, but do you have an other solution to the original 2005 post?
John Zeman wrote:Recently I made the decision to write all my new html documents in strict mode. No problems doing so until I added a

target="_blank"

attribute to an anchor element.

Posted: Fri Jan 16, 2009 5:40 pm
by MikeGale
Answer: Don't use strict.

Posted: Fri Jan 16, 2009 6:26 pm
by Lou
Yes of course. But not much of an intellectual exercise.