
February 12th, 2008, 03:59 PM
|
|
|
|
Setting flash embed tags wmode=opaque
ive got a floater javascript that will create an overlay-style popup. the problem is that i don't have access to a lot of the flash code being used on the site. i'd like to have the script go through all embed tags if mozilla is being used and set wmode="opaque"
i've tried all three of the following solutions, none of which actually sets the attribute. any tips would be great!
Code:
_self.isFirefox=navigator.userAgent.match(/Firefox/);
if(_self.isFirefox) var o=document.getElementsByTagName('embed');for(var emb,i=0;emb=o[i];i++)emb.wmode="opaque";
if(_self.isFirefox) var o=document.getElementsByTagName('embed');for(var emb,i=0;emb=o[i];i++)emb.setAttribute("wmode","opaque");
if(_self.isFirefox) var o=document.getElementsByTagName('embed');for(var emb,i=0;emb=o[i];i++){var n=document.createAttribute('wmode');n.value='opaque';emb.setAttributeNode(n);}
|