Objects examples
This first example illustrates a simple use of objects. Continuing with my baby obsession, baby.htm creates a few baby objects and makes them cry.
Warning: Some of the JavaScript contained within may not be suitable for
sensitive readers (this means you, Ashton).
See the example or view source
This next example uses objects to maintain an interactive contact book,
containing names, areas of involvement and phone numbers for the members of
APC. The script is remarkable not because of what it does, but how it
does it. The script is simple enough that with a few more explicit comments,
just about anyone could maintain it properly.
See the example
or view source
With this example, we return to our friends at Foo. The guys have decided that they need to advertise their products on their site, so they stole the script apcmag.cd.
Having contacted sources close to apcmag, the story behind the script goes something like this: Originally, the CD and Web site used a script that randomly showed ads. While this method of displaying ads worked OK, the advertisers did not like the idea that thier ads would be displayed 'randomly'. So the ad guys hired one of thier overworked, underpaid and exploited-by-the-big-mean-corporation programmers to write a new script that would cycle through the ads in a prespecified order.
However, to get the script to work under IE3, it has to do some tricky things,
and the script itself is not pretty!
See the example,
or view source