24666

What is the correct way to open a form submit in a new window now target is deprecated

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 :(

Answer1:

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.

Recommend

  • A few /proc and /dev questions
  • How to forcefully download .csv file instead of getting in open on browser in html
  • Using target on div without a href
  • Access 2007 forms with parameterized RecordSource
  • Java Date object constructor for getting string is deprecated
  • Opening links in a new tab and only the new tab
  • Is it possible to extract table infomation using Apache Tika?
  • Get or convert Week of year to ISO week
  • Base Internationalization and “Could not find a storyboard named […]”
  • UITableView takes much longer to load when numberOfRows returns a large number
  • JSF2.0 + Primefaces 3.0.1 + jquery 1.6.4 + p:commandLink + IE8 throws Unexpected call to method or p
  • XBee Linux Serial Port on Rasberry Pi
  • Opening two instances of InAppBrowser (_system and _blank) prevents events from triggering
  • Responsive design method for collapsing a div
  • unable to get jsonEncode in magento2
  • Xstream to map “choice” elements of XML
  • Combining two different ActiveRecord collections into one
  • Web.config system.webserver errors
  • Automatically associate new Sonar project with custom quality profile and quality gate
  • why xml file does not aligned properly after append the string in beginning and end of the file usin
  • Body moving without any force applied? (Box2d)
  • How can I send an e-mail from a vbs script
  • HTML download movie download link
  • Sony Xperia Z Tablet not found by adb
  • Javascript convert timezone issue
  • Javascript + PHP Encryption with pidCrypt
  • what is the difference between the asp.net mvc application and asp.net web application
  • Why is the timeout on a windows udp receive socket always 500ms longer than set by SO_RCVTIMEO?
  • jQuery tmpl and DataLink beta
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • Apache 2.4 - remove | delete | uninstall
  • 0x202A in filename: Why?
  • Invalid access key error using credentials redeemed from an amazon open id token
  • retrieve vertices with no linked edge in arangodb
  • using conditional logic : check if record exists; if it does, update it, if not, create it
  • NSLayoutConstraint that would pin a view to the bottom edge of a superview
  • How do you join a server to an Active Directory (domain)?
  • Understanding cpu registers
  • File not found error Google Drive API
  • Add sale price programmatically to product variations