This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13677 - onsubmit attribute not allowed on form
Summary: onsubmit attribute not allowed on form
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-05 03:08 UTC by Brad
Modified: 2015-08-23 07:07 UTC (History)
0 users

See Also:


Attachments

Description Brad 2011-08-05 03:08:57 UTC
The validator for HTML5 flags the onsubmit attribute of the form element as not valid. From W3C:

http://www.w3schools.com/html5/html5_ref_eventattributes.asp

onsubmit is an allowed form event. 

The error I get is below:

Attribute form not allowed on element form at this point.

...method="post" target="hidden_iframe" onsubmit="submitted=true;">

Attributes for element form:
Global attributes
accept-charset
action
autocomplete
enctype
method
name
novalidate

Brad
Comment 1 Ville Skyttä 2011-08-23 19:59:44 UTC
(In reply to comment #0)
> From W3C:
> http://www.w3schools.com/[...]

Please note that W3Schools != W3C.


> onsubmit is an allowed form event. 
[...]
> Attribute form not allowed on element form at this point.

The error message says that attribute "form" is not allowed on element "form", I don't see anything about onsubmit in it.  A URL to a document or a complete HTML5 fragment with which the problem can be reproduced would be helpful.
Comment 2 Michael[tm] Smith 2011-10-25 08:35:13 UTC
see comment #1