flash problem in IE7 and IE6  
Author Message
mikalush





PostPosted: JScript for the .NET Framework, flash problem in IE7 and IE6 Top

i add flash banner to my website,that is link to another page.

but in IE7 and IE6 the link isn't working in one click only with dubble click,

is any one know how to resolve it

here is the code i added:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://www.hide-link.com/ #version=5,0,0,0" width=450 height=78 id=ShockwaveFlash1>
<param name=movie value="/images/Tip1.swf">
<param name=quality value=high>
<param name=wmode value=transparent>
<embed id="myFlash" name="myFlash" quality=high width=450 height=78 swLiveConnect=true type="application/x-shockwave-flash" pluginspage=" http://www.hide-link.com/ ;></embed></object>

thanks. mikalush



.NET Development28  
 
 
Dennis Stone - MSFT





PostPosted: JScript for the .NET Framework, flash problem in IE7 and IE6 Top

I believe the reason you are seeing this is that when you use the object tag to add the banner the user is required to click the control to active it due to the increased security of IE6 and 7, so the first click activates it, and the second actually uses it.

 
 
mikalush





PostPosted: JScript for the .NET Framework, flash problem in IE7 and IE6 Top

 

i was told that microsoft made it in fact,

because they were forced by the court to do so,

and the solution is to add special code to IE so it will work well

the code you have to insert in your page is:

<!--[if gte IE 6]><script type='text/javascript' language='javascript' src='JS/NoIEActivate.js'></script><![endif]-->

and the JS page has to be:

 var strBrowser = navigator.userAgent.toLowerCase();
 if(strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0){
  var theObjects = document.getElementsByTagName('object');
  var theObjectsLen = theObjects.length;
  for (var i = 0; i < theObjectsLen; i++) {
   if(theObjects[i ].outerHTML){
    if(theObjects[i ].data){
     theObjects[i ].removeAttribute('data');
    }
    var theParams = theObjects[i ].getElementsByTagName("param");
    var theParamsLength = theParams.length;
    for (var j = 0; j < theParamsLength; j++) {
      if(theParams[j ].name.toLowerCase() == 'flashvars'){
        var theFlashVars = theParams[j ].value;
      }
    }
    var theOuterHTML = theObjects[i ].outerHTML;
    var re = /<param name="FlashVars" value="">/ig;
    theOuterHTML = theOuterHTML.replace(re,"<param name='FlashVars' value='" + theFlashVars + "'>");
    theObjects[i ].outerHTML = theOuterHTML;
   }
  }
 }

window.onunload = function() {
 if (document.getElementsByTagName) {
  var objs = document.getElementsByTagName("object");
  for (i=0; i<objs.length; i++) {
   objs[i ].outerHTML = "";
  }
 }
}

 (attention: i add spaces in every [ i ] to avoid it to look like a lamp: Idea so remove it when you copy it...)

thanks.

and good luck to anyone who will use it..