Specifying targets in strict documents

Discussion about HTML and XHTML related issues.

Specifying targets in strict documents

Postby John Zeman » Sat Mar 12, 2005 12:13 pm

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 3:17 pm

Postby John Zeman » Sat Mar 12, 2005 1:04 pm

Never mind, I finally found the answer here:

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

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

Postby Dwight_Stegall » Fri Jan 16, 2009 10: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?
Dwight_Stegall
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 6
Joined: Thu Jan 15, 2009 8:52 pm
Location: East Moline, Illinois

Re: Specifying targets in strict documents

Postby Lou » Fri Jan 16, 2009 12:56 pm

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.
User avatar
Lou
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 180
Joined: Fri Jul 29, 2005 5:55 pm
Location: MD

Postby MikeGale » Fri Jan 16, 2009 6:40 pm

Answer: Don't use strict.
User avatar
MikeGale
Rank VI - Professional
Rank VI - Professional
 
Posts: 604
Joined: Mon Dec 13, 2004 2:50 pm
Location: Tannhauser Gate

Postby Lou » Fri Jan 16, 2009 7:26 pm

Yes of course. But not much of an intellectual exercise.
User avatar
Lou
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 180
Joined: Fri Jul 29, 2005 5:55 pm
Location: MD


Return to HTML and XHTML

Who is online

Users browsing this forum: No registered users and 1 guest