views:

36

answers:

1

Normally I would us

<form target="_blank">

But looking through

http://www.w3schools.com/tags/tag_form.asp

I notice the target attribute is deprecated.

So what is the correct XHTML compliant way to perform such an action?

UPDATE: Thanks, I appreciate that opening new windows is not generally a good idea but in this case it's a third party linking to our site who wants this effect and unfortunately whilst I can suggest good design to them whether they take my advice is another matter :(

+2  A: 

The target attribute is not deprecated (W3Schools is wrong again (and not the W3C)), it just doesn't appear in Strict.

If you want a new window from a form, then use the target attribute (and a Transitional doctype).

However, author triggered new windows are considered harmful.

David Dorward
Hmm. The W3C does seem to specialise in unhelpful subtle distinctions, which are difficult to reproduce in tutorials. The DTDs themselves describe the difference between them as "... attributes and elements that W3C expects to phase out ...". Is it reasonable that W3Schools should have to explain the difference between "expects to phase out" and "deprecated"? In HTML5, "deprecated" is never used. Instead we get "obsolete but conforming". While I understand it as a precise description of its status, as an web author, I've no idea what use that status is.
Alohci