Re: form validation
Re: form validation
- Subject: Re: form validation
- From: has <email@hidden>
- Date: Wed, 13 Mar 2002 02:12:01 +0000
Michael Turner wrote:
>
I recommend Javascript for html-form validation before submission to any
>
CGI. Validation in Javascript is easier and earlier (client-side).
Client-side JS -based validation would be good for augmenting server-side
validation with the sort of convenient and sophisticated 'popup warnings'
[1], etc that Jessica is looking for. It should _not_ be considered a
replacement for it though, as you _cannot_ assume that all clients will
have javascript-enabled browsers (or browsers with JS disabled [2]).
It sounds like the solution would be to use a standard server-side check to
catch those submissions that didn't go via the client-side validation
first. (Which basically means sending the user one of two pages: a success
page, and an "Sorry, but XXXX is entered incorrectly. Please use your
browser's Back button to return to the form and rectify this, then submit
again" error page.) Then enhance your submission forms with some
client-side code that'll provide the more sophisticated pre-submission
validation for those able to take advantage of it.
has
[1] Though it's worth remembering that lots of users have gotten to
associate popups of any form with #!**$%!! popup/popunder ads, and you're
as likely to irritate them by using these. I'd suggest a spin around some
web developer resource sites to see what other tips and techniques are
available to the discerning designer these days.
[2] e.g. Me.:) Though I've heard 20% banded around in the past, I don't
really know what the average JS/non-JS ratio is. And it'll likely vary
depending on the target user group(s) anyway.
http://www.barple.connectfree.co.uk/ -- The Little Page of Beta AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.