How would I use target="_blank" without getting a validation error without switching DOCTYPE?
How would I use target="_blank" without getting a validation error without switching DOCTYPE?
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
How do you get a validation error? What doctype are you using?
I think he is using strict DTD and it will fail the validation if you use TARGET attribute.
I think you better have a look at this article which deals with this problem.
or
You can go for a JavaScript based solution (fail in certain machines where it is turned off).
A think a loose DTD (with target="_blank") is better than a JavaScript window open.
- Mike
The hint behind removing the "target" attribute is that you shouldn't be opening windows
If you really want to open a window, Javascript is quite sufficient, since the content of popups shouldn't be vital anyway.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Opening windows is very useful in many situations. That's stupid.
Like... a forum, where people place links in posts that open in a new window so the forum isn't lost.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
True djr... but find me a forum that passes validation....![]()
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
I think validation is overrated. Sure, it's good in some ways, but if it just removes some options completely, then that's dumb.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
BLiZZaRD: SMF doesI think it's as XHTML Strict (or maybe Trans), but it does validate.
djr33, that's the point of Strict DOCTYPEs.As I said, there's no reason not to use Javascript. A simple way to replicate target="_blank" is:Opening windows is very useful in many situations. That's stupid.Code:<a href="somepage.html" onclick="window.open(this.href); return false;">
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
{CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
Follow Me on Twitter: @InkingHubris
PHP Code:$result = mysql_query("SELECT finger FROM hand WHERE id=3");
echo $result;
Bookmarks