Before JavaScript, the process of creating and validating information


Before JavaScript, the process of creating and validating information that a user entered via a form depended heavily on sending and receiving information from a server-side CGI script. A CGI was possibly used for creating the actual form, validating the information and sending a response back to the user confirming that the information had been sent successfully.
Using JavaScript, you can place much of the work on the client-side, which can reduce dramatically the connection times between the client and the server. In terms of validating form information, you do this by allowing the script to inspect the contents of each field that the user has entered and present an alert to the user if the information does not meet some specific requirements-like too many characters or if the field is empty.