Re: Off Validation Subject

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