JavaScript event handlers
Back in 1993 when the National Center for Supercomputing Applications (NCSA) developed Mosaic, the HTML standard was introduced to provide a way to present information with a graphical front end, but little more. However, as the Web gained popularity, users demanded more control over the layout of a page, and Netscape responded by providing proprietary extensions to HTML. As the Web's exterior began to shape up, users then demanded something more: increased interactivity.
Although we now take most of our Web experience for granted, the introduction of forms changed the entire paradigm of the Web. Whereas previously the user pulled information from servers to their desktop, forms allow for two-way communication between user and content creator. A couple of the many possibilities that this introduces include Internet commerce, and the online discussion databases on apcmag.com.
HTML forms send information back to the server, where they are then processed, usually using CGI (Common Gateway Interface). While it is beyond the scope of the tutorial to explain CGI programming, we will look at how to use JavaScript to verify user input, as well as how to use form elements to present interesting graphical components in standalone JavaScripts.