Link to home
Start Free TrialLog in
Avatar of wotan1953
wotan1953

asked on

In IE 6 - get 'Click To Activate And Use This Control', when mousing over Flash section in page

Hi EE -

In IE 6.0 I get 'Click To Activate And Use This Control', when I mouse over the flash movie. Once I click, the alert goes away.

I've tried this,

In Page:

<script type="text/javascript" src="/js/ieupdate.js">touchflash();</script>


In script:

function touchflash()
{
      theObjects = document.getElementsByTagName("object");
      for (var i = 0; i < theObjects.length; i++) {
      theObjects[i].outerHTML = theObjects[i].outerHTML;
      }
}


Basically, a whole lotta nuthin :-)  Any help here will be appreciated.

Thanks -
emc
ASKER CERTIFIED SOLUTION
Avatar of war1
war1
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wotan1953
wotan1953

ASKER

Hi War1 -

Thanks - But I really need something that will not require the user to install a patch. I've heard there is a js solution which can be added to the code. The code effectively, does that first click (ie click to activate etc) for the user.

Hopefully, this is doable .

Thanks Again -
emc

emc, I do not know of any such Javascript.
Hi Folks -
Here is one!

In page:
<SCRIPT src="/js/flashLoader.js"></SCRIPT>

JS Script: flashLoader.js
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="xxx" height="yyy">');
document.write(' <param name="movie" value="/flash/FLASHMOVIENAME.swf">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<embed src="/flash/FLASHMOVIENAME.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="xxx" height="yyy"></embed>');
document.write('</object>');

This works okay for now. The only problem I have had so far is, with my most recent site developed in RadDesigner. Basically, when you open a content page (where the script call is) the editor opens with both the script call:

ie <SCRIPT src="/js/flashLoader.js"></SCRIPT>

and

the actual object code :-(  If I updated, at that point,  there would be 2 flash movies on my page ... I think.

So, I guess I'm good for now.  War1 the link you provided:

http://www.baekdal.com/articles/Technology/microsoft-ie-activex-update

was very helpful, in arriving at this solution, so the points should go to you.

Thanks Again ee - you folks are Great!

emc
emc, glad to help!
There are problems with the 2 solutions above:
- the patch is, as War1 mentions, temporary, and will be disabled by the MS June Security update
- the js solution was suggested by MS in their article here:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp but I have found it doesn't work all the time.

I work on a website that includes several activeX controls.  After the April update that made IE comply with Eolas we changed the code that includes the controls.  Rather than embedding the <object> tags in the pages we insert them using JScript in an included .js file.

The embedded code looks like this:
<div id="DivDateTime"></div>
<script language="JScript">
  CreateControl( 'DivDateTime','<OBJECT id="DTP"
codeBase="../Packages/DateTime.CAB#version=123" classid="CLSID:xxxx"
VIEWASTEXT><PARAM NAME="foo" VALUE="bar><SPAN STYLE="COLOR:red">ActiveX
control [DateTime] failed to load </SPAN></OBJECT>');
</script>

and the included js file just contains one function:
  function CreateControl(ElementId, innerHTML)
  {
      var d = document.getElementById(ElementId);
      d.innerHTML = innerHTML;
}

This solution works 99% of the time, but every now and then IE will decide that I need to click on every ActiveX control to activate before I can use it.  A refresh of the page doesn't seem to resolve the issue, but closing IE and opening it again does.  Any other ideas?