Welcome to WebmasterWorld Guest from 54.145.166.96

Forum Moderators: incrediBILL

Message Too Old, No Replies

Where to Open the Action URL since target attribute is deprecated

   
6:45 pm on Oct 10, 2010 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hi,

Please look at the following reference:
[w3schools.com ]

If the target attribute of <form> is deprecated, what's the right way to do it?


Thanks in advance!
Regards
Rain Lover
7:00 pm on Oct 10, 2010 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



There might be some other way - but with HTML5 the target attribute is legitimate and the browser support for it is certainly fine.

If you need the page to validate, you can just change the DTD to <!DOCTYPE html> and you are future-proof, as far as I can see - unless your page depends on quirks mode, that is. The HTML5 DTD always triggers standards mode.
7:17 pm on Oct 10, 2010 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



the target attribute of <form> is deprecated


Well, it has been "undeprecated" (which is not a word, but describes best the situation!), so there is no real issue using target on a form tag. Don't hesitate to use it if you need it, browser support is universal.

It won't validate in HTML 4.01 Strict (or XHTML 1.0 Strict), but it will validate as HTML 4.01 Transitional (either in quirks or standards mode) as well as with HTML5.
3:49 pm on Oct 12, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Agreed, if you're not using XHTML features, a different doctype would likely better describe the content anyway. But if you absolutely must use an XHTML doctype, you can use Javascript as a substitute for the target attribute in forms and anchors/hyperlinks. It leads to another compromise, it's now Javascript dependent, but will validate.
12:19 pm on Oct 15, 2010 (gmt 0)

5+ Year Member Top Contributors Of The Month



Dear tedster/encyclo/rocknbil,

Thanks for the answer! :-)
1:27 pm on Oct 15, 2010 (gmt 0)

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Validation is supposed to be helpful not a hindrance - just use the target attribute anyway.

As a matter of principle, you should never allow the decisions of stupid people to inconvenience you if you can avoid it. Everyone with more than two brain-cells to rub together knows that the target attribute is perfectly sensible - it's only been deprecated because a few brain-dead code-nazis managed to weasel their way into a position where they would wield a little power and annoy people.

Kaled.
12:26 pm on Oct 25, 2010 (gmt 0)

5+ Year Member



Good call Kaled, I couldn't have put it better.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month