In our various site's stats, of several thousand daily users, 4% had
javascript disabled and 99.3% of those were crawlers. What are your
site's stats like?
Cutter
Denny Valliant wrote:
The only trouble with JavaScript is: what if it's turned off?
The isValid() and maybe hidden form fields
Denny Valliant said:
The only trouble with JavaScript is: what if it's turned off?
Then you fall back to server-side validation.
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.
And how is AJAX
On 5/2/06, Jochem van Dieten [EMAIL PROTECTED] wrote:
Denny Valliant said:
The only trouble with JavaScript is: what if it's turned off?
Then you fall back to server-side validation.
Indeed, if you remembered to do it. I've found lots of places
where their only validation is through JS.
You could just loop over all form field and test If they are blank.
E.g.
cfset excludelist=submitbutton,whatever !--- list of fields to exclude
from the check ---
cfset blank = false
cfloop list=#form.fieldnames# index=field
cfif not listfind(excludelist, field)
cfif len(form[field]) is
FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.
!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
: More of a JS Question/Forms
FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.
!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED
-Talk
Subject: RE: More of a JS Question/Forms
FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.
!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL
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.
Eric,
While Charlie's
Wright [mailto:[EMAIL PROTECTED]
Sent: Monday, May 01, 2006 9:08 AM
To: CF-Talk
Subject: Re: More of a JS Question/Forms
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
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
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
give each form field a unique ID.
if ((document.getElementById('field1').value == )
(document.getElementById('field2').value == )) {
alert('foobar');
return false;
}
that's the basic/most straightforward way. there are some regex's for
JS that will also check to make sure there are
12 matches
Mail list logo