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.  Thank god for the
web developer extension for firefox! Click click!

I'm guilty too, I've got some dates that aren't validated 'cept
JS, which I've been meaning to isValid or whatnot.

> 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 going to work if Javascript doesn't work?


It's just a method to have both.  If JS is enabled, you can have
the AJAX check the inputs while they're still on the form, but
have it degrade nicely if they don't have JS enabled, using the
same submission page with a plain old "post" instead.

Theoretically.

In one app, I've got all the form fields in a DB, which I use to
determine if it's required, max length, etc..  Then I dynamically
generate the select queries, JS validation, DB insert validation...

In a setup like that it is easier to add the "check it from all
angles" - JS and Server Side- because I control the angles
through standard variables (required, length, datatype).

Doing it by hand is a pain in the ass but best practice is to
have both... so some wayform or another...
:de

-ps Although I've shied away from cfform, I like how now
you can do the same stuff I rolled my own to do (cf 7).


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239333
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