- From: David Dorward <david@dorward.me.uk>
- Date: Fri, 11 Feb 2005 09:45:05 +0000
- To: Abyss <info@abyss.ws>
- Cc: www-validator@w3.org
On Fri, Feb 11, 2005 at 07:43:33PM +1100, Abyss wrote:
> I wish to validate a form with JavaScript , but the name attribute is not
> allowed in XHTML 1.1.
>
>
> What is the correct way to validate form fields with JS?
Usually through the elements collection of the form.
<form ... onsubmit="return check(this)">
function check(frm) {
frm.elements['element_identifier'];
}
This is very off-topic here though. I suggest you try the
comp.lang.javascript newsgroup. If you don't have access to an NNTP
service, try Google Groups.
--
David Dorward http://dorward.me.uk
Received on Friday, 11 February 2005 09:45:10 UTC