Error in script techniques draft [Was: Re: Updated Internal Drafts Published]

Ben Caldwell wrote:


> Just a quick note to let everyone know that the latest round of internal working drafts has been published. 

> Scripting Techniques for WCAG 2.0
> http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-SCRIPT-TECHS-20041008/ 

That draft in
http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-SCRIPT-TECHS-20041008/#form-uris
provides an example and explanation supposed to show and explain how to 
properly use the onsubmit event handler saying:

   The checkFormFields() function would return true if there are form
   errors, stopping the submission of the form:

   <form action="submit.php" onsubmit="return checkFormFields();">

however that is completely wrong, if you want to use script to cancel 
the form submission due to errors then you have to return false in the 
onsubmit handler.

-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/

Received on Saturday, 9 October 2004 13:28:06 UTC