It’s been too long since I’ve W3C-validated front-end code. Came across a problem with a JavaScript-validated form in an XHTML 1.0 Strict web page because forms are not specced to take the name attribute.
Instead of
HTML: <form name="foo" ... > <select name="bar" ... > JavaScript: if (document.foo.bar.value == '') { return false; }
one should use
HTML: <form id="foo" ... > <select name="bar" ... > JavaScript: if (document.forms['foo'].bar.value == '') { return false; }