Home arrow JavaScript arrow Page 13 - JavaScript and Embedded Objects
JAVASCRIPT

JavaScript and Embedded Objects


There's more to Web browsers than (X)HTML, CSS, and JavaScript. ActiveX, plug-ins, and other embedded objects help make the Web what it is today. Get the scoop on these and more in this chapter excerpt from JavaScript: The Complete Reference, second edition, by Thomas Powell and Fritz Schneider McGraw-Hill/Osborne, ISBN 0072253576.

Author Info:
By: McGraw-Hill/Osborne
Rating: 4 stars4 stars4 stars4 stars4 stars / 92
October 26, 2004
TABLE OF CONTENTS:
  1. · JavaScript and Embedded Objects
  2. · Java
  3. · Including Applets
  4. · Accessing Applets in JavaScript
  5. · Issues with JavaScript-Driven Applets
  6. · Plug-ins
  7. · MIME Types
  8. · Detecting Specific Plug-Ins
  9. · Interacting with Plug-Ins
  10. · Refreshing the Plug-Ins Array
  11. · Interacting with a Specific Plug-In
  12. · ActiveX
  13. · Cross-Browser Inclusion of Embedded Objects
  14. · Interacting with ActiveX Controls
  15. · Summary

print this article
SEARCH DEVARTICLES

JavaScript and Embedded Objects - Cross-Browser Inclusion of Embedded Objects
(Page 13 of 15 )

By far the best way to ensure the cross-browser compatibility of your pages is to use a combination of ActiveX controls and plug-in syntax. To accomplish this, use an <object> intended for IE/Windows ActiveX controls and include within it an <embed> intended for Netscape and IE/Macintosh plug-ins. The technique is illustrated in the following example:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#\ version=6,0,40,0"
name="demoMovie" id="demoMovie" width="318" height="252"> <param name="movie" value=http://www.javascriptref.com/examples/ch18/flash.swf
/>
<param name="play" value="true" />
<param name="loop" value="false" />
<param name="quality" value="high" />

<embed src="http://www.javascriptref.com/examples/ch18/flash.swf"
width"318" height="252" play="true" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"> <noembed>
 
Error: No Object or Embed Support
</noembed>
</embed>

</object>

Browsers that do not understand <object> will see the <embed>, whereas browsers capable of processing <object> will ignore the enclosed <embed>. Using <object> and <embed> in concert maximizes the possibility that the user will be able to process your content.

McGraw-Hill-OsborneThis chapter is from JavaScript: The Complete Reference, second edition, by Thomas Powell and Fritz Schneider, McGraw-Hill/Osborne, ISBN: 0072253576). Check it out at your favorite bookstore today.

Buy this book now.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- Project Nashorn to Make Java, JavaScript Wor...
- JavaScript Virus Attacks Tumblr Blogs
- Google Releases Stable Dart Version, JavaScr...
- Khan Academy Unveils New JavaScript Learning...
- Accessing Nitro? There`s an App for That
- JQuery 2.0 Leaving Older IE Versions Behind
- Fastest JavaScript Engine Might Surprise You
- Microsoft Adjusting Chakra for IE 10
- Brendan Eich: We Don`t Need Google Native Cl...
- An Overview of JavaScript Statements
- An Overview of JavaScript Operators
- Overview of JavaScript Variables
- More of the Top jQuery Social Plugins
- The Top jQuery Social Plugins
- More of the Top jQuery Slider Plugins

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials