The only trouble with JavaScript is: what if it's turned off?

The isValid() and maybe hidden form fields would be "safest".

I think.

Not the most UI friendly. In conjunction with some AJAX it
could be, tho.
:D

On 5/1/06, Jochem van Dieten <[EMAIL PROTECTED]> wrote:
>
> Eric J. Hoffman wrote:
> > I know this isn't quite CF, but figure the folks around here have done
> > this easily.
> >
> > I have two forms, and I just want to check if no value has been entered
> > in either form, and pop to tell the user to enter something!  So I can't
> > do a required field in my validation because they can fill in one of
> > three fields or more in one form, but not the other.
> >
> > Anyway, I would check form1 and form2 for no values...I get that, but
> > wonder how to check for nothing from each form.
>
> function verify() {
>    fields = document.getElementsByTagName('input');
>    for (var i=0; i < fields.length; i++)   {
>      if (fields[i].value != '')
>        return true;
>    }
>    alert('Please fill out at least one form field!');
>    return false;
> }
>
> Jochem
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239207
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to