hey,
That is what i usually use to send the user to a new window when a link is clicked but XHTML Strict doesn't seem to like that.
How else can i do that?
target="_blank"
Ideally a fully accessible site should let the users choose themselves if they want to open a link in a new window blah blah blah.
(no offense intended to accessibility purists).
Having said that you can use a javascript function and pass it the URL.
function open_new(url) { window.open(url); }
target="_blank"
lol that's fair enough .
I think i'd rather let it be then add extra javascript into the page. :mrgreen:
target="_blank"
that's one difference between Strict and Transitional...
I know this keeps some developers from going to the Strict version XHTML due to legacy issues on a site.
target="_blank"
There is a 'proper' way to open a linked doc in a new window, that will satisfy everyone but those who despise effect.
<a href="some.html" onclick="return !window.open(this.href);"> go there</a>The 'return !' returns the negative value of the result of attempting to open a new window. If the javascript succeeds, returning true, the html link receives false and does not fire. Should the javascript fail to open the window, the result is false, the html link receives true and fires. If there is no javascript, the html link fires.
The onclick event handler exhibits graceful failover, a Good Thing®, and the construct is valid html4/xhtml1 strict.
cheers,
gary
target="_blank"
target="_blank"
Coincidence strikes again! Thank you for asking the question Gaia!
Gary, now I gotta learn DOM too? :?
Re: target="_blank"
That is what i usually use to send the user to a new window when a link is clicked but XHTML Strict doesn't seem to like that.
The reason for this is because behavior was removed from markup and left strictly to the DOM. Opening a new window is behavior.
target="_blank"
may sound like a complete newbie here , but what is DOM?
target="_blank"
target="_blank"
Coincidence strikes again! Thank you for asking the question Gaia!
Gary, now I gotta learn DOM too? :?
Hah! I'll bet you believed them when they handed you a copy of FrontPage and said you were a WEB DESIGNER.

cheers,
gary
target="_blank"
I looked at the sitepoint article that firstreflex cited. It seems a bit of ridiculous overkill to me. Then I saw the mention of the window.open() shortcoming. They say that when using that method 'most' browsers don't properly send referer data. I imagine that's especially important to them.
I was curious, so I ran a little test. I made a page up with a link to another page on my server, using the window.open() method. I then ran `tail -f /var/log/apache/access.log` to watch my access log live.
Run the test in Firefox, referer is shown.
Run test in Opera, referer is shown.
Run test in IE, referer is not shown.
:shrug: I guess IE would be 'most' browsers. Imagine that.
cheers,
gary
target="_blank"
DeprecatedDiva wrote:They didn't tell you about javascript and the DOM when you signed up? What about PHP, SQL, and the GIMP? The CLIs for mysql and ssh and scp and ftp? Or about blog, cms, and bb applications? Merchant accounts?Coincidence strikes again! Thank you for asking the question Gaia!
Gary, now I gotta learn DOM too? :?
Hah! I'll bet you believed them when they handed you a copy of FrontPage and said you were a WEB DESIGNER.![]()
cheers,
gary
Nope! They left me in the dark and told me that the mushrooms that I will find growing around me are my normal fodder. It's only when I started asking questions that I realized there is more than mushrooms out there! I've been around long enough that I at least know what most of those acronyms say. What they are and how they function is another matter entirely.
Truth be told on the FP front, the only people who try to hang that sign on my neck that says WEB DESIGNER are my husband and my son.
To this day, I keep getting the feeling that I am going to get booted from all these sites I've signed up on over the last year when they find out that I didn't go to school to learn any of this stuff, but that I did it because I'm a grandma who decided to figure out how that newfangled thang called the internet could be used to sell products that I JUST learned to make back in 2003. Each painful step has led to so many new options that the learning curve gets steeper the longer I stick with it.
I am still trying to wrap my mind around client-side javascripting. Like the individual who recently claimed an inability to learn css, I find I have to be knocked down with a taser (modern equivalent of being struck by lightning) before I grasp tidbits of all these "languages" that I've chosen to learn. W3schools is a patient teacher and w3c is a patient resource. I found them before I found this forum. But this forum has been helping me put things together better than many of the resources I've been gleaning in my quest to understand.
I'm no webmaster and I am honored to be allowed to sit in the back of this classroom and audit this course. I am most honored that I am allowed to ask questions and reply when I actually know something!
target="_blank"
Ah - so DOM does not stand for Dirty Old Man then :oops:
target="_blank"
Ok, I'm really confused. It says you can't use the target="_blank" in strict XHTML, but I did and it works --- but it shouldn't.
target="_blank"
Or maybe even more accurately, "What am I not doing that I shoulod be doing?"
I can answer that one. You have not validated the html. W3C offers this somewhat sniffy observation of your use of target="_blank"
...ef="http://www.akzonobel.com" target="_blank" class="textlink">akzo Nobel</a>
You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).
target="_blank"
:roll: clashed with DD, who knows more than she lets on
target="_blank"
oh, ok.
Doesn't some pop-up blockers block the javascript type child windows though?
target="_blank"
Ok, I'm really confused. It says you can't use the target="_blank" in strict XHTML, but I did and it works --- but it shouldn't.
It works because despite the fact that you are trying to code to a strict standard, the page is still being served as good old fashioned HTML, and IE is incapable of handling XHTML anyway. This means that all browsers will treat your pages as HTML, which is why things work that shouldn't. The reason that most of us work to XHTML standards is so that our sites will be ready and error-free if and when Microsoft ever decides to include an XHTML parser in a future version of IE. This issue runs a lot deeper than these few lines but you can read this thread if you want to know more > http://www.csscreator.com/css-forum/ftopic10975.html

target="_blank"
some browsers do block javascript pop-ups... (I always block them) so if it's essential information you may want to consider not using popups.