target="_new"

He has: 688 posts

Joined: Feb 2001

I'm reading how to customize FireFox and I came across this statement:

Quote: Firefox has a built-in pop-up blocker that is activated by default. However, it doesn't stop web pages from opening in new windows by using the target="_blank" or the illegal target="_new" properties.

What do they mean by "the illegal target="_new" property? Confused I use target="new" (without the underscore) all the time and it validates fine. Anybody know if this is a problem or why? Thanks.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

target="new" says open this page in the window named "new".

target="_new" is a false attribute value that generally works like target="_blank" (open in a new empty window) only it opens all pages into the same new window. It's not valid.

If you mean "_blank" you should use "_blank".

They have: 5,633 posts

Joined: Jan 1970

_top
_blank
_parent
are the only ones I use

He has: 1,758 posts

Joined: Jul 2002

Plus I think the target attribute has been dropped in xhtml hasnt it? (not sure if its the current version or the next one...).

(apart from in the frameset DTD that is...)

Andy

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Yes and no -- you can add things to the DTD for XHTML for it to work.
http://www.texastar.com/tips/2004/target_blank.shtml

JavaScript is also an option:
http://www.sitepoint.com/article/1041/3

He has: 5 posts

Joined: Mar 2004

are there other "illegal" codes that we should be aware of?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.