HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help
View Poll Results: Select your favorite choice form validation.
Client-Side: Multiple Alerts 2 28.57%
Client-Side: One Alert 1 14.29%
Client-Side: Image Alert 0 0%
Client-Side: Show error next to form fields. 2 28.57%
Client-Side & Server-Side Combo: Use combination of both. 1 14.29%
Server-Side: Forget Client-Side altogther. 1 14.29%
Voters: 7. You may not vote on this poll


Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 8th, 2004, 10:38 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
Exclamation Javascript Form Validation Alerts Are EVIL!!!

As programmers sometimes we forget who are actually using forms so we code the easiest method to inform the end user that there are errors in the form because this makes our life easier. That method is the infamous multiple alert!

But for the end user, those poor people who have to endure these alerts, error alerts get annoying rather quickly possibly resulting in disabling javascript or worse yet, leaving the site to never return again. Ever.

For short forms, such as 2 or 3 fields, thisn't isn't that big of a problem. But with a form like the following example, it's a BIG problem. Example: http://developer.netscape.com/docs/...val/USform.html

Alternative methods of informing the user that the form has validation errors in it are:

  1. Display ALL errors with 1 alert.
    • Pros: Simple, fast, & easy to code.
    • Cons: Can get annoying after many attempts to fix errors.
  2. Display Image errors.

    • Pros: Short code.
    • Cons: Requires images for each error type.
  3. Display errors next to form fields.

    • Pros: User-friendly.
    • Cons: Too much code.
  4. Or use Server-Side validation only.

    • Pros: Get's the job done right.
    • Cons: Round trips to server.
If there is another method that is not listed here, please feel free to post it and a working example. Now that I'm done rambling on and on, cast your vote in my poll and voice your opinion...

Reply With Quote
  #2  
Old August 11th, 2004, 12:27 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
No opinons yet...

Reply With Quote
  #3  
Old August 11th, 2004, 01:01 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,760 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 5 h 22 m 16 sec
Reputation Power: 443
You should validate on both the Client and the Server.

Reply With Quote
  #4  
Old August 25th, 2004, 01:11 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
Quote:
Originally Posted by Memnoch
You should validate on both the Client and the Server.

Thanks to selwonk for providing a crisp, clean, and short method of doing this using Javascript.

See this thread for more: http://forums.aspfree.com/t35672/s.html

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > Javascript Form Validation Alerts Are EVIL!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway