Main Page

Interacting with Plugins

Interacting with Plugins
The Web is much more than HTML and images. Today, Web sites across the world make use of
many different types of plugins. Plugins give Web browsers the capability to embed small (and
sometimes large) programs or objects into a page without interfering with the underlying HTML.
When a browser encounters content inside of an
<object/>
element, it hands over rendering
responsibility to the associated plugin.
Originally, the plugin of choice was a Java applet. Applets allowed Web developers to include Java
functionality directly in a Web page. Since that time, many more plugins have been developed.
This chapter focuses on the most popular plugins used today and how you can use JavaScript to
interact with them.
Why Use Plugins?
In the beginning, Web pages were fairly static creations. Before the advent of the DOM, after a page
was loaded its appearance remained the same until it was unloaded. Traditional developers lived in
a world of dynamic interfaces, where everything the user did caused a change on the screen, but
when they turned to the Web, they found the environment severely lacking in dynamism. Then
came Java.
Java originally wasn’t designed for use in Web browsers because, at the time of its inception, the
World Wide Web was nothing but a concept. However, as the Internet and the Web gained popu-
larity, the original Java developers saw the opportunity to enrich the Web browsing experience by
using Java. The result was an experimental browser called HotJava, which was written by Sun
Microsystems as a proof of concept for how Java applets could be embedded into Web pages. For
the first time ever, Web pages were no longer static; instead, there was movement, user interaction
without page reloading, and a bright new future for the Web.
Around the same time, Netscape began developing an architecture for
helper applications
. The basic
idea was to enable the browser to recognize the mime type of information and then launch the
21_579088 ch18.qxd 3/28/05 11:43 AM Page 531


JavaScript EditorFree JavaScript Editor     Ajax Editor


©