We're now midway through our jaunt into client-side territory. We spent the last chapter learning about how script code looks in HTML, and how the browser object model provides programmatic access to the functionality of the browser. In this chapter, we'll continue our look at client-side programming. First we'll talk a little more about how we can use objects outside of those that the browser provides. Then we'll move on to the main part of this chapter—real-world examples showing how adding client-side functionality to our pages can overcome programming difficulties, and improve on what ASP allows us to accomplish.
Along the way, we'll see four separate examples. The first, and simplest, shows how we can make our page more 'usable', by simply changing the default focus on an input form. From there, we'll move on to look at how we can use client-side code to validate the entries on a form before we submit it to our server. We'll also have a closer look at using frames in a Web page, with an example that uses ASP to make them responsive to user input. Finally, we'll see how we can improve the user interface by using objects that are not part of the browser itself.
All these examples are aimed at demonstrating some of the ways that the combination of Active Server Pages, client-side scripting and objects can be used to create client/server applications. These, after all, are what real-world use of the browser, especially on a closed network like a corporate Intranet, is all about.
The main points we're covering in this chapter are:
<APPLET>
and <OBJECT>
tags.So, without further ado, let's talk about new objects...