Availability: |
| |||||||
Inherits from: | Element object | |||||||
JavaScript syntax: | IE | myEmbed = myDocument.all.anElementID | ||||||
IE | myEmbed = myDocument.all.tags("EMBED")[anIndex] | |||||||
IE | myEmbed = myDocument.all[aName] | |||||||
- | myEmbed = myDocument.anElementName | |||||||
- | myEmbed = myDocument.embeds[anIndex] | |||||||
- | myEmbed = myDocument.getElementById(anElementID) | |||||||
- | myEmbed = myDocument.getElementsByName(aName)[anIndex] | |||||||
- | myEmbed = myEmbedArray[aName] | |||||||
- | myEmbed = myEmbedArray[anIndex] | |||||||
- | myEmbed = myDocument.getElementsByTagName("EMBED")[anIndex] | |||||||
HTML syntax: | <EMBED> | |||||||
Argument list: | anIndex | A reference to an element in a collection | ||||||
aName | An associative array reference | |||||||
anElementID | The ID value of an Element object | |||||||
Object properties: | accessKey, align, height, hidden, name, palette, pluginspage, readyState, src, tabIndex, units, width | |||||||
Event handlers: | onBlur, onClick, onDblClick, onFocus, onHelp, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp |
Netscape and MSIE encapsulate plugin/embedded objects in a different way. In MSIE they are objects of the EMBED class. In Netscape they are objects commonly referred to as belonging to the Plugin class, although they are really implemented as JavaObject objects. In MSIE, this is an ActiveX object.
There is additional confusion in that there is a plugins[] array that belongs to the document and another that belongs to the navigator object. They both contain collections of objects, but of different types. This is further confused by the fact that the document.plugins[] array is another name for the document.embeds[] array.
Because of this confusing situation, the best recommendation is that we refer to document.embeds[] and navigator.plugins[] and quietly ignore the document.plugins[] object. Furthermore we shall refer to Plugin objects as being something the browser can use to play embedded content and Embed objects will be an instance of a plugin that is alive and running in a document.
Interacting with the properties of Embed objects in MSIE seems to work quite reliably. This is not the case with Netscape, which is prone to all kinds of strange behavior. However that may be version and platform specific and could depend greatly on the quality of what you are embedding.
As an example, Video plugins work really well on one particular platform and are generally less optimal on others. Windows media player is great on Windows and lacking in reliability and quality on other platforms. QuickTime is brilliant on Macintosh and good on Windows, but it still suffers some instability. Real player is pretty good everywhere, but it works better as a player than it does as a plugin. Windows media player works well as a plugin on MSIE. QuickTime is good as both a plugin and a player, but its JavaScripting control is somewhat behind Real player. None of them share the remotest similarity as far as properties, parameters or JavaScript API calls are concerned. If only we could have some compatible video players, we could solve a lot of the embedding problems.
Property | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
accessKey | 1.0 ![]() | 3.0 ![]() | 2.0 ![]() | 4.0 ![]() | 3.0 ![]() | 2.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
align | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
height | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
hidden | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
name | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
palette | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ReadOnly |
pluginspage | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ReadOnly |
readyState | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ReadOnly |
src | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
tabIndex | 1.0 ![]() | 3.0 ![]() | 2.0 ![]() | 4.0 ![]() | 3.0 ![]() | 2.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
units | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
width | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | - |
Event name | JavaScript | JScript | N | IE | Opera | NES | ECMA | DOM | CSS | HTML | Notes |
---|---|---|---|---|---|---|---|---|---|---|---|
onBlur | 1.1 ![]() | 3.0 ![]() | 3.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
onClick | 1.0 ![]() | 3.0 ![]() | 2.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onDblClick | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onFocus | 1.0 ![]() | 3.0 ![]() | 2.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
onHelp | ![]() | 3.0 ![]() | ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
onKeyDown | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onKeyPress | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onKeyUp | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseDown | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseMove | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseOut | 1.1 ![]() | 3.0 ![]() | 3.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseOver | 1.0 ![]() | 3.0 ![]() | 2.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
onMouseUp | 1.2 ![]() | 3.0 ![]() | 4.0 ![]() | 4.0 ![]() | 3.0 ![]() | ![]() | ![]() | ![]() | ![]() | 4.0 ![]() | ![]() |
Prev | Home | Next |
<EMBED> | Up | Embed.align |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |