Another way to get around ActiveX silliness
Written by on March 8th, 2007 in Ajax News.
Eric Anderson has written his own script to get rid of the annoying “Click here to activate” IE now puts on all ActiveX controls (including Flash).
There are other solutions such as UFO and SWFObject that we have discussed in the past.
JAVASCRIPT:
-
-
if (navigator.appName == “Microsoft Internet Explorer”) (function() {
-
var onload = window.onload || function(){};
-
document.body.setAttribute(’onload’, null);
-
window.onload = function() {
-
onload.apply(this, arguments);
-
var tags = [’object’, ‘embed’, ‘applet’];
-
for( i=0; i<tags.length; i++ ) {
-
var elements = document.getElementsByTagName(tags[i]);
-
for(j=0; j<elements.length; j++)
-
elements[j].outerHTML = elements[j].outerHTML
-
}
-
}
-
})();
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/another-way-to-get-around-activex-silliness