|
Posted by McKirahan on November 25, 2006, 7:51 pm
Please log in for more thread options
> I have lots of form validation going on.
>
> When something fails validation, I highlight the offending field and
> write an error message at the bottom of the form.
>
> This was fine until I was trying to click on a submit button *of my own
> form* and wondering why nothing was happening. I had made a mistake in
> one of the fields so it had highlighted it, but when I corrected it I
> made a *second* mistake which caused the same error. Due to this it
> appeared that absolutely nothing was happening when I was pressing
> submit.
>
> So I got to wondering whether I should throw up an alert() box instead
> (providing Javascript is enabled obviously). This provides immediate
> and obvious feedback that an error has occured. However I cannot think
> offhand of any sites which do this, so I guess there must be a good
> useability reason for not doing it? Other than an extra click though I
> cannot see the problem (but then I'm a newbie to this web authoring
> lark)
I do it with my intranet apps.
Here's an example of the alert():
Missing/invalid data found.
Fix the fields with red arrows.
3 error(s) encountered:
Customer Name
City
State
I store thr value of the field's display name as
a hidden field then show that rather than the
field's internal (database) name; e.g. cusName.
If JavaScript isn't enable how are you doing
client-side validation? If you're only doing
server-side validation that down't the screen
refresh with the errors? (unless AJAX...)
|