1 / 15

Client-Side Validation with Javascript

Client-Side Validation with Javascript. by Daniel Yee. Client-Side Scripting Language. Javascript European Computer Manufacturers Association (ECMA) ECMA-262 Third edition Updated Last December 1999. Javascript. Not a full fledged programming language Cannot connect to databases

allenramos
Download Presentation

Client-Side Validation with Javascript

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Client-Side Validation with Javascript by Daniel Yee

  2. Client-Side Scripting Language • Javascript • European Computer Manufacturers Association (ECMA) • ECMA-262 • Third edition • Updated Last December 1999

  3. Javascript • Not a full fledged programming language • Cannot connect to databases • Limited interactions to system resources • Cannot do tasks most web databases require

  4. Common Uses of Javascript • Validation of <form> data • Simple interaction with <form> data • Adding dynamic elements to web page

  5. Benefits of using Javascript • Faster response then using server-side validation • Reduction in web-server load • Reduction in network traffic • Can be saved as a file - file.js and reused by typing <script type= text/javascript src=“file.js”>

  6. Warning!!!!!!!!!!!!! • Never rely on client-side validation as the only method of ensuring requirements and constraints • Javascript can be bypassed by the user through design, error, or configuration

  7. Validating <form> Data • Simple example for validating a <form> with JavaScript • Check for whitespace

  8. Batch Error Reporting • Validation for multiple fields • Batch error reporting • Example

  9. Interactive Validation • Password <form> validation • Example

  10. Dynamic Elements • Some implementations not associated with web database applications • MouseOver • Prefilled calculations

  11. MouseOver • Creating a mouseOver Event • Example

  12. Prefilled Calculations • Shopping cart updating • Example

  13. Conclusion • Javascript is a client-side scripting language • Can be used for validating forms and enhancing user interactions • Benefits include improved speed, reduced load, and added features

  14. REMEMBER!!!!! • NEVER USE AS THE ONLY METHOD TO ENSURE REQUIREMENTS, SECURITY, AND CONSTRAINTS • WHY? • BECAUSE IT CAN BE BYPASSED BY THE USER

  15. The End

More Related