18.04.2016 Views

Professional JavaScript For Web Developers

javascript for learners.

javascript for learners.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 18<br />

If there is no registered plugin for the MIME type, the browser may (depending on which one you are<br />

using) offer to install the correct plugin for the file. Many browsers also look for the pluginspage<br />

attribute, which is an unofficial attribute of (it doesn’t exist in the HTML specification).<br />

This attribute specifies where to find the plugin for the embedded object if it isn’t already on the user’s<br />

machine. Example:<br />

<br />

Including parameters<br />

Sometimes an object requires additional parameters before it can start running. To specify parameters for<br />

an embedded object, use the element with its name and value attributes:<br />

<br />

<br />

<br />

Each object can have any number of parameters. Including parameters that aren’t necessary doesn’t<br />

have any negative effect.<br />

Netscape 4.x<br />

The old Netscape 4.x browsers don’t support the element, so you use the old Netscape proprietary<br />

element. The element accepts most of the same attributes as <br />

(indeed, was modeled after ), except the src attribute is used instead of data:<br />

<br />

<br />

<br />

As you can see, this approach is very similar to using . The problem is that newer browsers<br />

don’t support this element (it has officially been deprecated). So if you plan on supporting Netscape 4.x,<br />

the preferred solution is to use with an element inside of it, such as in the following:<br />

<br />

<br />

<br />

<br />

<br />

<br />

Using this approach, the newer browsers ignore the element and use to embed<br />

the file; Netscape 4.x ignores and uses to embed the file.<br />

534

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!