Friday, January 12, 2007
How to remove the Gray border around Flash Object in IE
Recently Microsoft has released Internet Explorer 6+ updates that changed the way it handles the active content and ActiveX objects like flash player, Quick Time and sun Java. Now IE blocks the user from accessing ActiveX controls (and tags like EMBED, APPLET and OBJECT) directly. A thick gray color border can be be found these controls with the text saying "Click to activate and use this control", when they are inactive.

Though all these controls works fine with all other browsers but the problem is only with Internet Explorer. To use these control user needs to Click on it twice ( first click to activate and another to play the control). Sometimes its really annoying.....isn't it??
This gray border can be easily removed with the help of Java script. Here is the solution of this problem...
Step 1:
Create a new file in notepad and add following java script code in to it...
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}
Step 2:
Save the file with extention ".js" ( extention for javascript files).
for example: "removeborder.js"
Note: Dont forget to add double quotes before and after the file name, while saving otherwise Notepad will save it with its own extention .txt( text file).
Step3:
Insert the following line to <head> </head > tag of the HTML page:
<script type="text/javascript" src="removeborder.js"></script>
Step 4:
Its all done. Now enjoy the original beauty of your HTML page in internet explorer too.

