»
EnglishFrenchVietnamese

Print - Assuming Plugin Beginner on IE - JavaScriptBank.com

Full version: jsB@nk » Utility » Assuming Plugin Beginner on IE
URL: https://www.javascriptbank.com/assuming-plugin-beginner-on-ie.html

Assuming Plugin Beginner on IE © JavaScriptBank.comA simple JavaScript to activate plugin flash objects in Internet Explorer 7 and users don't have to click on Flash for activating. In addition to object and embed tags, support is also provided for applet tags and all their param tags.

Full version: jsB@nk » Utility » Assuming Plugin Beginner on IE
URL: https://www.javascriptbank.com/assuming-plugin-beginner-on-ie.html



JavaScript
<script type="text/javascript">/* -----------------------------------------------   Explorer Plugin Starter - v.1.1   (c) 2007 www.haan.net   contact: jeroen@haan.net   You may use this script but please leave the credits on top intact.   Please inform us of any improvements made.   When usefull we will add your credits.  ------------------------------------------------ */function fixPlugin() { var objects = document.getElementsByTagName('object'); for (var i = 0; i < objects.length; i++) {  var paramEl = '';  var params = document.getElementsByTagName('param');  for (var j = 0; j < params.length; j++) {   paramEl += params[j].outerHTML;  }  objects[i].outerHTML = objects[i].outerHTML.replace('>', '>' + paramEl); } var embeds = document.getElementsByTagName('embed'); for (var i = 0; i < embeds.length; i++) {  embeds[i].outerHTML = embeds[i].outerHTML; } var applets = document.getElementsByTagName('applet'); for (var i = 0; i < applets.length; i++) {  var paramEl = '';  var params = document.getElementsByTagName('param');  for (var j = 0; j < params.length; j++) {   paramEl += params[j].outerHTML;  }  applets[i].outerHTML = applets[i].outerHTML.replace('>', '>' + paramEl); }}</script><!-- It is preferred to call the script in this manner as it savestime and prevent problems with Flash preloaders. Place it the bottom ofthe Web page, just before the closing body tag. --><!--[if IE 7]><script type="text/JavaScript">fixPlugin();</script><![endif]-->