WHATWG HTML5 Forums Forum Index WHATWG HTML5 Forums
A Forum for HTML5 Discussions: Semantics, DOM APIs, Microdata, Canvas, WebGL, Offline Web Applications, Local Storage, WebM Video, WebSockets, Web Workers, HTML5 Drag and Drop, HTML5 Forms, Accessibility, Syntax, News, Keywords, Yet More Keywords & More.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved] <form target="..."> non HTML 5 conf

 
Post new topic   Reply to topic    WHATWG HTML5 Forums Forum Index -> General
View previous topic :: View next topic  
Author Message
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Wed Dec 05, 2007 9:17 pm    Post subject: [solved] <form target="..."> non HTML 5 conf Reply with quote

Hey all!
That's my first post here, so I hope I don't make any mistake. My name is Le Sage, & I'm the webmaster of the little html5.fr & its blog.
The main page of html5.fr is supposed to be HTML 5, but I recently added a search bar using Google, & it stopped validating for the following reason:
html5.validator.nu wrote:
Error: Attribute target not allowed on element form at this point.

Arrow the incriminated webpage & the validation result (by the validator of Henri Sivonen).
Here seems to be the problem:
Code:
<form method="get" action="http://www.google.fr/search" target="_blank">
...
</form>

The target attribute doesn't seem to be welcome here. Though, I had a look at the HTML 4.01 & Web Forms 2.0 specs & didn't see anything that would forbid this.
Any idea where it would come from?
If it's not the appropriate place for such a question, please forgive me. If you need any detail, I'm here to answer.
Thanks in advance! Very Happy


Last edited by Le Sage on Thu Dec 13, 2007 10:46 am; edited 3 times in total
Back to top
View user's profile Send private message
anne
<h5>


Joined: 06 Feb 2007
Posts: 32
Location: Sometimes Utrecht, NL

PostPosted: Thu Dec 06, 2007 7:26 pm    Post subject: Reply with quote

It seems that HTML4 did not allow target= and HTML5 does (by means of Web Forms 2.0) and that indeed, validator.nu has a bug.
Back to top
View user's profile Send private message MSN Messenger
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Fri Dec 07, 2007 12:32 pm    Post subject: Reply with quote

HTML 4.01 didn't? I was something on the HTML 4.01 specs - form element:
HTML 4.01 specs - form element wrote:
Attributes defined elsewhere
* id, class (document-wide identifiers)
* lang (language information), dir (text direction)
* style (inline style information)
* title (element title)
* target (target frame information)
[...]

Doesn't it mean that it's valid? BTW, it's taken into account by FF & IE (probably by others too, didn't check).
Here is for the Web forms 2.0 specs - form element.
So if it's a bug, I guess I should contact the validator's author. I'll do it soon.
Thanks for your help, Anne. Smile
Back to top
View user's profile Send private message
anne
<h5>


Joined: 06 Feb 2007
Posts: 32
Location: Sometimes Utrecht, NL

PostPosted: Sat Dec 08, 2007 9:50 pm    Post subject: Reply with quote

Hmm, it's not part of the DTD snippet. I guess it was only part of Transitional, not Strict.
Back to top
View user's profile Send private message MSN Messenger
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Sun Dec 09, 2007 11:57 am    Post subject: Reply with quote

Just checked, that's right; <from target="..." ... is allowed in transitional, but not in strict HTML 4.01 (which makes sense, if you compare it to normal <a href="..." ... links).
I haven't mailed the validator's author yet, but I'll do it soon.
Thanks again for your comments, Anne.
Back to top
View user's profile Send private message
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Sun Dec 09, 2007 6:19 pm    Post subject: Reply with quote

mail just sent
I hope my problem isn't already listed in the know issues (had a quick look at it, but didn't find it)
Back to top
View user's profile Send private message
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Thu Dec 13, 2007 8:33 am    Post subject: Reply with quote

I got an answer from Henri Sivonen; he corrected his rules according to this thread. However, he doesn't see where it's stated that form may contain target in WF2. I thought this link was enough to proove it:
WF2 specs wrote:

interface HTMLFormElement : HTMLElement {
...
attribute DOMString target;
...
};

May anyone confirm?
I don't see form associated with target in the HTML5 Elements and Attributes list by Simon Pieters (zcorpan on this forum), so I'm confused now. Did I misread the specs? Confused
Thanks to everyone for your help anyway, I'll post another problem with HTML entities in XHTML 5 soon. Smile
Back to top
View user's profile Send private message
zcorpan
<h1>


Joined: 06 Feb 2007
Posts: 436
Location: Sweden

PostPosted: Thu Dec 13, 2007 9:46 am    Post subject: Reply with quote

AFAICT, WF2 doesn't allow the target="" attribute. This is probably a bug in the spec.

The presence of the DOM attribute, and the fact that it reflects the content attribute, doesn't in and of itself make target="" allowed. It just says what UAs have to do.
Back to top
View user's profile Send private message MSN Messenger
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Thu Dec 13, 2007 10:15 am    Post subject: Reply with quote

My English is very poor, but...
Web Forms 2.0 specs, 2.16. Extensions to the form element:
Web Forms 2.0 specs wrote:

To support incremental updates of forms, a new attribute is introduced on the form element: replace. This attribute takes two values:
document
The default value. The entire document (as specified by the target attribute when the document uses frames or windows) is replaced by the return value.

Web Forms 2.0 specs, 5. Form submission, 8. Step eight: Handle the returned data:
Web Forms 2.0 specs wrote:

If the response is an HTTP 205 Reset Content response (or equivalent for other protocols), then the document in the frame or window targeted by the form submission is left in place[...]
For replace="document" (the default), the response body replaces the document from which the submission initiated (or, if there is a target attribute, the document in the appropriate frame or window).

Question Question
If it's written somewhere in the specs that WF2 doesn't allow the target="" attribute, I guess it should be written more clearly, 'cause I didn't see it anywhere. Smile (no irony, I'm not so good in reading specs)
ADD: in the WF2 specs, appendix A. XHTML module definition, there is no trace of the target attribute in the form element. Though, it's written
Quote:
The Web Forms 2.0 Module provides all of the forms features found in HTML4, plus the extensions described above.

Does HTML4 mean strict, loose?
Anyway, it also says
Quote:
When frames and multiple windows are also allowed, the target attribute is added to the form, input and button elements.

Does it close the debate according to you? Rolling Eyes
Back to top
View user's profile Send private message
zcorpan
<h1>


Joined: 06 Feb 2007
Posts: 436
Location: Sweden

PostPosted: Thu Dec 13, 2007 10:24 am    Post subject: Reply with quote

None of those quotes say that the target attribute is allowed. They are just UA requirements. You can't read UA requirements and draw conclusions about what authors are allowed to do. (Also see http://ln.hixie.ch/?start=1140242962&count=1 )

Again, the lack of <form target> is probably a spec bug and it is on the editors' radar.

http://lists.w3.org/Archives/Public/public-html/2007Dec/0169.html


Last edited by zcorpan on Thu Dec 13, 2007 10:26 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
zcorpan
<h1>


Joined: 06 Feb 2007
Posts: 436
Location: Sweden

PostPosted: Thu Dec 13, 2007 10:25 am    Post subject: Reply with quote

Le Sage wrote:
Does HTML4 mean strict, loose?

Strict (I think).
Back to top
View user's profile Send private message MSN Messenger
Le Sage
<h4>


Joined: 05 Dec 2007
Posts: 54
Location: Casablanca, Morocco

PostPosted: Thu Dec 13, 2007 10:46 am    Post subject: Reply with quote

I understand. Thanks for having reported the bug. Keep us in touch about this. Very Happy
I mark the thread as solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WHATWG HTML5 Forums Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group