Topic: Transitional vs Strict Markup.

I think this article might come in handy at some point:

Transitional vs. Strict Markup

Exercise your faith!

Re: Transitional vs Strict Markup.

Bump. This is a really good article. Go check it out.

Give me liturgy or give me death.

Re: Transitional vs Strict Markup.

I found this very useful. Thanks, Yannick!

I am new to XHTML, but I'm sure I saw a target attribute on a Strict XHTML. Is that a deadly sin?

Is there a way to make a client browser open a link in a new window without using a target attribute?

He is no fool who gives what he cannot keep to gain what he cannot lose

Re: Transitional vs Strict Markup.

Couldn't find the original article that dealt with rel="external", but this should do the trick... http://www.sitepoint.com/article/standa … iant-world

{{{(>.<)}}} (o.o) \(^o^)/

Re: Transitional vs Strict Markup.

That's correct, target="_blank" is not supposed to be used anymore. There are differing opinions on it, but I believe it to be a sure-fire way to make yourself look like a newbie. Here are a few more articles on the topic, both from guys I highly respect (they disagree)...

http://www.456bereastreet.com/archive/2 … w_windows/
http://www.robertnyman.com/2006/02/13/h … attribute/

Give me liturgy or give me death.

Re: Transitional vs Strict Markup.

Artjom -

idcaft wrote:

Is there a way to make a client browser open a link in a new window without using a target attribute?

The simplest method would be to add the following to your 'a' tag:  onclick="window.open('url')"

If the visitor has javascript turned off, then it will simply display the url in place of the current page like any link.  At any rate, please use sparingly.

That’s my 2¢.  :^{>

Last edited by maspick (2006-03-30 12:13:18)

Honored to Serve for Him - Tom ('Mas) Pickering <)><

Re: Transitional vs Strict Markup.

Will pop-up blockers not always defeat a window being opened by javascript?

Proverbs 3:5,6

Re: Transitional vs Strict Markup.

Josh -

josh wrote:

Will pop-up blockers not always defeat a window being opened by javascript?

Most likely.  If the visitor wants a particular document, say a PDF, that is set to open an additional window, then they will have to add the site to their popup white list.  Obviously, this is a good argument for avoiding opening another browser window. wink

That’s my 2¢.  :^{>

Honored to Serve for Him - Tom ('Mas) Pickering <)><

Re: Transitional vs Strict Markup.

The only problem with that method is that the Javascript becomes obtrusive. If you are going to use this method, I suggest putting all Javascript in a js file and have your js file call your id's or class names to open the new window. Keeps the separation of content, behavior and style.

Re: Transitional vs Strict Markup.

Robert -

Robert Evans wrote:

The only problem with that method is that the Javascript becomes obtrusive. If you are going to use this method, I suggest putting all Javascript in a js file and have your js file call your id's or class names to open the new window. Keeps the separation of content, behavior and style.

You're right, of course.  Everytime I think I'm getting to a point where I'm functional with this, I'm reminded how dense I really am. sad

That’s my 2¢.  :^{>

Honored to Serve for Him - Tom ('Mas) Pickering <)><

Re: Transitional vs Strict Markup.

You aren't dense at all and you are quite functional as you have shown numerous times on this forum. We all overlook things here and there. I know I do.

Re: Transitional vs Strict Markup.

Thank you guys! Somehow I forgot about javascript completely when I was asking that question.

He is no fool who gives what he cannot keep to gain what he cannot lose

Re: Transitional vs Strict Markup.

Funny thing is, the target attribute is no deprecated in javascript, so you can use javascript to add a target to any link that shoots offsite...

function offsiteblank() {
  var a, thisdomain, links;
  thisdomain = window.location.host;
  links = document.getElementsByTagName('a');
  for (var i = 0; i < links.length; i++) {
    a = links[i];
    if (a.host && a.host != thisdomain) {
	a.target = "_blank";
    }
  }
}
Josh Townson

Re: Transitional vs Strict Markup.

Target isn't deprecated in transitional, which is why I haven't made the jump to strict. Some of the sites I do are better suited to opening link with new windows...one example is a link site like CCM Links. Hundreds of links to Christian artists...it makes sense to open each artist's site in a new window so that visitors can select more than one artist.

Some would disagree, obviously...but I'd rather use transitional than add javascript, generally.

We're all looking forward to the future...but none of us more than the giant, evil robots.