Scripting on the Client

So how exactly do we write code that runs on the client and uses objects? We’ll start by looking at the HTML page itself and we'll examine where the code goes and how it’s connected to objects (both to respond to events and to manipulate the objects themselves). After this we’ll cover the details of the browser including the sorts of objects that are available for use in our scripts.Later we’ll talk briefly about the capabilities of the two browsers we're most likely be targeting while writing client-side code: Netscape Navigator and Internet Explorer.

While we’ll show you some examples in JavaScript, we’ll tend to stick to VBScript as our primary scripting language, as it is our first choice language in the rest of the book. However nearly everything should remain applicable to both languages—it’s just a matter of making the translation between one syntax and the other. Netscape Navigator supports the same scripting object model that is used by Internet Explorer. In fact, Netscape invented this object model with Navigator 2.0—the first browser to support client-side scripting.

© 1997 by Wrox Press. All rights reserved.