ArrowNuke DotNetNuke Custom Modules Skins and training Home | Site Map | Google Site Map | Login | Register
Arrow Nuke Dot net Nuke Custom DNN Modules DotNetNuke Skinning and training
ArrowNuke DoNtetNuke Custom DNN Modules DotNetNuke Skinning and training
 ArrowNuke Blog Minimize


 Print   
 ArrowNuke Blog Minimize


 Print   
 Click to Activate and Use This Control - Active Content EASY Fix Minimize

Location: BlogsArrowNuke Blog    
Posted by: Ryan Morgan 5/10/2006 7:13 AM

Okay, so everyone with Flash on their websites who was paying attention realized just recently that when you hover your mouse over your Flash or Shockwave objects, that you are getting this funny little message that says: "Click to Activate and Use This Control." For everyone who wasn't paying as close attention, you have or will get a call from your more particular clients who will ask you why their site doesn't act the way it's supposed to any more.

Why IE had to implement this behavior: http://en.wikipedia.org/wiki/Eolas 
Adobe's Long Fix: http://www.adobe.com/devnet/activecontent/articles/devletter.html
Microsoft's Long Fix: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp

The problem with their solutions is that if the user has JavaScript disabled, nothing is going to print to the page. Plus it takes to long. They have you create a javascript function that prints the object tag to the page. If we can fool IE into thinking we printed it to the page with JavaScript, though, we can avoid the prompt. Create an external .js file and name it ObjectFool.js and include the following text:

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

The other good thing here is that if the user does not have JS enabled, IE will ask them to activate the control and that will be that - you don't have to worry about content not being delivered!

Next, for each page that has Flash on it, put the following tag just after the last Flash declaration on the page: .

 <script language="javascript" src="<%= SkinPath %>objectfool.js"></script>

* If you are implementing this solution in a DotNetNuke site, please make sure to include the SkinPath tag to tell the framework where to find it.

Permalink |  Trackback

Comments (5)   Add Comment
Re: Click to Activate and Use This Control - Active Content EASY Fix    By danacton on 8/8/2006 9:05 AM
Hi Ryan,
I'm still new to this and I'm trying to fix my page with the problem you described above.

I created the .js and loaded it into the correct skins folder. After that Im not sure what to do. What I did was placed this: into my pages.ascx (my skins page):



In doing this, I thought the page would find the javascript file.

Yet it has no effect whatsoever.

Can you help guide me through this. I really like using flash in Dnn, and after reading your blog, I now understand what's happened.

Dan

Re: Click to Activate and Use This Control - Active Content EASY Fix    By Jamie on 10/16/2006 1:28 PM
Yeah, i need some help with this too!

THanks

Re: Click to Activate and Use This Control - Active Content EASY Fix    By host2 on 10/16/2006 1:29 PM
With the first guy, it turned out being that he had put the link to the script before the Flash and it didnt work. IE processes pages top to bottom (simplified) so it will only work if you put it after the swf in question.

Re: Click to Activate and Use This Control - Active Content EASY Fix    By jamie on 10/16/2006 3:10 PM
Thanks for your help,
I am a little confused. I know i have to make a ObjectFool.js file and paste your code into it, but then I am not sure what to do on the ascx page for my skin?

My skin has flash on it, so it shows up on every page of the site that uses that skin.


Next, for each page that has Flash on it, put the following tag just after the last Flash declaration on the page: .*

* If you are implementing this solution in a DotNetNuke site, please make sure to include the SkinPath tag to tell the framework where to find it.



Do I put ".*" somewhere on the page? I am not sure where.

Thanks,

Jamie

Re: Click to Activate and Use This Control - Active Content EASY Fix    By host2 on 10/16/2006 3:10 PM
Please post your question in the normal forums under general support. I will try to help you there.


Your name:
Title:
Comment:
Add Comment   Cancel 

  

2006 Arrow Consulting & Design, Inc   Terms Of Use  Privacy Statement