For the rest of the chapter we'll focus on four separate examples that illustrates what we can do with a combination of client-side and server-side scripting, with a few objects thrown in, to improve our pages. In the first example we'll show an extremely simple way in which we can improve the friendliness of forms on our web page, and then in the second we'll look at an extensible block of code we can use to pre-validate form input on the client instead of the server. These first two examples show some common things to make our pages better that can't actually be done with ASP at all.
The last two examples continue to demonstrate some neat client-side features, but use ASP as an integral part—generating different client-side code depending on settings on the server. The third example explains a few different methods to control and synchronize frames—some. The final example uses a home-grown control created with Visual Basic 5.0 to give a taste of how powerful objects can be on the client and how ASP can be used to generate dynamic scripts and object insertion. Again, we're using VBScript code. However, as long as you understand the concepts behind the examples, there's nothing stopping you from rewriting them in any language supported by the browsers that your clients or customers will be using.
As with all of the sample code in the book, the code from this chapter is available from our web site: http://www.rapid.wrox.com/books/0723/