Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EOLA work around does not work

Status
Not open for further replies.

btween

Programmer
Aug 7, 2003
338
US
I have tried every workaround to avoid the "Click to activate and use this control" that I have found and none of them work. I see them working allright on other sites but for some reason it does not work on mine.

Any help with this is greatly appreciated.

Here are a few examples.

this is the flash movie:

Code:
	<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"[/URL] width="197" height="88" id="exp" ALIGN="">
 <PARAM NAME=movie VALUE="flash/exploadersq.swf"> 
 <PARAM NAME=quality VALUE=high> 
 <PARAM NAME=bgcolor VALUE=#FFFFFF>
 <EMBED src="flash/exploadersq.swf" swliveconnect="true" quality=high bgcolor=#FFFFFF NAME="exp" WIDTH="197" HEIGHT="88" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"></EMBED>[/URL]
</OBJECT></object><script language="JavaScript" type="text/javascript" src="NoIEActivate.js"></script>

here is one version of the script

Code:
//ediy v2
n=navigator.userAgent;
w=n.indexOf("MSIE");
if((w>0)&&(parseInt(n.charAt(w+5))>5)){
T=["object","embed","applet"];
for(j=0;j<2;j++){
E=document.getElementsByTagName(T[j]);
for(i=0;i<E.length;i++){
P=E[i].parentNode;
H=P.innerHTML;
P.removeChild(E[i]);
P.innerHTML=H;
}}}


here is another version:

Code:
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;
}
 
I had no luck with many of the fixes recently - and certainly no luck with ones that might work with Flash Satay (allowing you to embed Flash while having your code validate against a DOCTYPE).

I've found that using this HTML:

Code:
<div id="banners">
	<object type="application/x-shockwave-flash" data="flashBannerToUse.swf" width="600" height="90">
		<param name="movie" value="flashBannerToUse.swf">
		<img src="imageToUseIfNoFlashInstalled.gif" width="600" height="90" alt="Alt text" title="Title text">
	</object>
</div>

with this JS being run "onload":

Code:
/* Stops IE giving the "Click here to active this..." message (part of the Eolas patent ruling) for "Satay"-embedded Flash objects */
function patchEolasPatent() {
	var objects = document.getElementsByTagName('object');
	for (var loop=0; loop<objects.length; loop++) {
		var object = objects[loop];
		if (object.type == 'application/x-shockwave-flash') {
			var _type = object.type;
			var _data = object.data;
			var _width = object.width;
			var _height = object.height;
			var _noFlash = object.innerHTML;
			var _html = '';
			_html += '<object type="application/x-shockwave-flash" data="' + _data + '" width="' + _width + '" height="' + _height + '">';
			_html += '<param name="movie" value="' + _data + '" />';
			_html += _noFlash;
			_html += '</object>';
			object.parentNode.innerHTML = _html;
		}
	}
}

works fine for me in IE 6, Fx 1.5, and even IE 7.

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Unfortunately this did not work either. I am not surprised, I think since microsoft's last update patch it is simply impossible to get arount the click to activate...

I have browsed through numerous flash based sites, and not one has bypassed this issue, which forces you to double click everything. It's annoying when you have a flash movie that has a rollover effect, but you don't know it unless you click inside that empty outline.

 
Weird that it didn't work for you. It works just fine for me - even with a fully patched IE 6 or IE 7, using the exact code I posted above.

Ah well - perhaps you have something else on your page interfering with the code.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I guarantee you it does not work in the following combination.

You have IE 6 + latest windows updates.

Go to some default site such as google, then do internet options, delete all offline content, then type in the url of any site with flash and you will always get the click to activate box when the ste loads.

Make sure that you are not on the page with the flash when you are deleting offlince content, because the page still remains cached otherwise.

 
Are you saying that code doesn't work for you, or are you saying that "any site with Flash" doesn't work for you?

If the other sites don't employ work-arounds, then of course they will not work. I was trying to ascertain whether the code I gave above (which works for me on a fully-patched IE6 or IE7) works for you on your site.

Do you have a URL for your site? I'd be interested on seeing if you have other code that is stopping that work-around from working for you.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top