[thelist] JavaScript form validation - do all radio groupshaveaselection checked?

S.F. Alim salim at vodatel.com
Tue Aug 2 01:17:38 CDT 2005


Hi list,
Instead of  writing your following code like this

  if document.theForm.elements[a].type == "radio"

Just do this to it

if (document.theForm.elements[a].type == "radio")

see what are you missing here

S. F. Alim

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Joshua Olson
Sent: Monday, August 01, 2005 10:33 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] JavaScript form validation - do all radio
groupshaveaselection checked?

> -----Original Message-----
> From: Canfield, Joel
> Sent: Monday, August 01, 2005 2:54 PM
>
> > There may be an error here:
> >
> > >   alert("out of the script")
> > > return true
> > > }
>
> Why?

I was thinking because of the lack of semicolon after the alert.

> > Also, there may be a non-syntactical error here:
> >
> > >   myWholeFormArray = document.theForm.elements
> > >   for (a = 0; a < myArray.length; a++
> >
> > The array you defined is different than the array specified
> > in the loop.
>
> d'oh. a lot. thanks. that helped.

You're welcome.

<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168
Fax: 413.812.4864

Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/


--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !





More information about the thelist mailing list