Real-World JavaScript: "Alertless" Client Side Error Messages
You've put some good old blood, sweat, and tears into your latest project, and you are very happy with the way things have turned out. In particular, the design you have come up with (or implemented) is quite snappy and you are feeling especially proud of yourself.
Then you take a look at your form validation, and those old gray alert boxes that say "please fill in your name, click OK" are just not doing it for you. Isn't there a more elegant way to have client side error messages than the JavaScript popup?
Overview
Table of Content:
- Is This Really a Good Idea?
- What Do We Get?
- The Form
- The Error Field
- Calling the Function
- Writing the Script
- Set the References
- Clear Old Errors
- Loop Through the Form and Check for Errors
- Set the Error Message
- Finishing Up
- In Action
- Conclusion
Reviews
Be the first to write a review
You must me logged in to write a review.