Specifying targets in strict documents

Discussion about HTML and XHTML related issues.
Post Reply
John Zeman
Rank III - Intermediate
Rank III - Intermediate
Posts: 56
Joined: Sat Dec 11, 2004 2:17 pm

Specifying targets in strict documents

Post by John Zeman » Sat Mar 12, 2005 11:13 am

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

John Zeman
Rank III - Intermediate
Rank III - Intermediate
Posts: 56
Joined: Sat Dec 11, 2004 2:17 pm

Post by John Zeman » Sat Mar 12, 2005 12:04 pm

Never mind, I finally found the answer here:

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

John

Dwight_Stegall
Rank 0 - Newcomer
Rank 0 - Newcomer
Posts: 6
Joined: Thu Jan 15, 2009 7:52 pm
Location: East Moline, Illinois
Contact:

Post by Dwight_Stegall » Fri Jan 16, 2009 9:21 am

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?

User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 280
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Re: Specifying targets in strict documents

Post by Lou » Fri Jan 16, 2009 11:56 am

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.
Lou
Say what you will about Sisyphus. He always has work.

User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
Posts: 711
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Post by MikeGale » Fri Jan 16, 2009 5:40 pm

Answer: Don't use strict.

User avatar
Lou
Rank V - Professional
Rank V - Professional
Posts: 280
Joined: Fri Jul 29, 2005 5:55 pm
Location: CO
Contact:

Post by Lou » Fri Jan 16, 2009 6:26 pm

Yes of course. But not much of an intellectual exercise.
Lou
Say what you will about Sisyphus. He always has work.

Post Reply