W3C home > Mailing lists > Public > www-validator@w3.org > February 2005

Re: Off Validation Subject

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
Message-ID: <20050211094505.GB4579@us-lot.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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT