The primary purpose of adding client-side script to a Web page is to create event procedures for controls. For example, you can write an event procedure that runs a function when a user clicks a particular button.
Client-side script is not compiled, nor is it encrypted on an HTML page. Therefore, if you view the HTML source of a Web page, you will see the script included in the page.
For a client-side script to function, a Web browser must support the scripting language. If it does not, the user will not have full access to the scripted features on the Web page.
Figure 9.1 How client-side and server-side scripting is used to develop Web applications
Because server-side script runs on a Web server, it has access to all resources, such as databases and executable files that reside on that server.
Server-side script requires a Web server that supports Active Server Pages. A Web browser does not need to provide any additional functionality for a server-side script to work. Therefore, server-side script runs regardless of which Web browser is used.
Client-side script is useful for performing the following tasks:
Server-side script is useful for performing the following tasks: