Click here to Skip to main content
Licence 
First Posted 3 Jun 2006
Views 13,340
Bookmarked 6 times

Objects in Internet Explorer

By | 3 Jun 2006 | Article
Simple code to eliminate the frame generated by Internet Explorer in the objects

Introduction

This code is a simply demostration how eliminate the "frame" (allowing interactivity) with the "OBJECT"s, without having to modify all the objects included in the code.

How do it

Well, you only have to add a *.js file (it doesn't work if you try to put the code in HTML code directly) in the bottom position of your HTML code, with this code:

function gestionFlashObj() {
 var navegador_ = navigator.appName;
 if (navegador_ == "Microsoft Internet Explorer") {
  var obj; 
  var i=document.getElementsByTagName("OBJECT").length -1; 
  var aux=""; 
  if (i<0) return;
  while (aux!= null) 
  { 
    aux=document.getElementsByTagName("OBJECT")[i].outerHTML; 
    document.getElementsByTagName("OBJECT")[i].outerHTML="<div id='objectoOb"+i+"'></div>"; 
    escribirPAntalla(document.getElementById("objectoOb"+i),aux); 
    i--; 
   }; 
  if (i<0) return;
  aux=document.getElementsByTagName("OBJECT")[i]; 
  }   
 }
}
function escribirPAntalla(aux,cont) { 
 if (aux!=null || cont!=null){
  aux.innerHTML=cont; 
 }
}
gestionFlashObj();

...you can see that  I only change the objects with another one, writing from the js.

VIP:You only have to be careful with "base" tags in the HTML code because when the js is executed the "base" aren't in use.


 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Angel Jiménez

Web Developer

Spain Spain

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 3 Jun 2006
Article Copyright 2006 by Angel Jiménez
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid