Re: More of a JS Question/Forms

2006-05-02 Thread Cutter (CFRelated)
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

Re: More of a JS Question/Forms

2006-05-02 Thread Jochem van Dieten
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

Re: More of a JS Question/Forms

2006-05-02 Thread Denny Valliant
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.

RE: More of a JS Question/Forms

2006-05-01 Thread Snake
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

RE: More of a JS Question/Forms

2006-05-01 Thread Andy Matthews
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

RE: More of a JS Question/Forms

2006-05-01 Thread Ben Nadel
: 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

RE: More of a JS Question/Forms

2006-05-01 Thread Andy Matthews
-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

Re: More of a JS Question/Forms

2006-05-01 Thread Jim Wright
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

RE: More of a JS Question/Forms

2006-05-01 Thread Eric J. Hoffman
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

Re: More of a JS Question/Forms

2006-05-01 Thread Jochem van Dieten
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

Re: More of a JS Question/Forms

2006-05-01 Thread Denny Valliant
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

Re: More of a JS Question/Forms

2006-04-30 Thread Charlie Griefer
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