Click to See Complete Forum and Search --> : Get rid of "Active x control, click to activate"


ryani210693
08-23-2006, 02:31 PM
Everyone must have seen it. Anything to do with flash, windows movies, al, on the internet, you have to click to use them first, to deactivate that random box.

The thing is, i'm going to be using flash on my site, so how do i get rid of this problem, and i know it can be done, as i have found many sites on this, but they seem to be either too confusing or don't work.

So, can anyone help?

thanks, Ryan.

fluidstudios
08-24-2006, 05:54 AM
yes i found this code somewhere.

First open notpade and write in it:


/-----------------------------------------------------------
/ ActiveX Object Workaround

function reActiveX()
{
// Test user agent
var strAgent = navigator.userAgent.toUpperCase();
var nIEIdx = strAgent.indexOf("MSIE");
if (nIEIdx == -1)
{
// If user agent does not look like IE, return -- this is not needed.
return;
}

// Build arrays of elements to rewrite
var doaEmbeds = document.getElementsByTagName("embed");
var doaObjects = document.getElementsByTagName("object");
var doaApplets = document.getElementsByTagName("applet");

// Iterate through objects, rewriting as we go
// EMBED
for (var raxi = 0; raxi < doaEmbeds.length; raxi++ )
{
var doRewriteObj = doaDomObjsToRewrite[raxi];
var doParentObj = doRewriteObj.parentNode;

var strHTML = doParentObj.innerHTML;

doParentObj.removeChild(doRewriteObj);
doParentObj.innerHTML = strHTML;
}
// OBJECT
for (var raxj = 0; raxj < doaObjects.length; raxj++ )
{
var doRewriteObj = doaObjects[raxj];
var doParentObj = doRewriteObj.parentNode;

var strHTML = doParentObj.innerHTML;

doParentObj.removeChild(doRewriteObj);
doParentObj.innerHTML = strHTML;
}
// APPLET
for (var raxk = 0; raxk < doaApplets.length; raxk++ )
{
var doRewriteObj = doaApplets[raxk];
var doParentObj = doRewriteObj.parentNode;

var strHTML = doParentObj.innerHTML;

doParentObj.removeChild(doRewriteObj);
doParentObj.innerHTML = strHTML;
}

return;
}

/-----------------------------------------------------------


Now save that as reactivex.js (save as type: all files)
then put that file in your website folder and add this little bit of cose to the end of the html in every page:

<SCRIPT TYPE="text/javascript" SRC="reactivex.js"></SCRIPT>
<SCRIPT TYPE="text/javascript">
reActiveX();
</SCRIPT>


That should work - sorry to whoever wrote the script, I can't remember where I found it.




------------
Web Design: www.hertfordshire-web-design.co.uk

ryani210693
08-24-2006, 07:46 AM
Unfortunately, this isn't working.

I've done exactly what you have said, but it doesn't work :(

Hope you can help!

thanks, Ryan.

the tree
08-24-2006, 08:02 AM
Whenever you come along with a question that is a variation on "how do I cut out a browsers security/whatever features for my own convinience", you're not going to come across a great awnser.

Now then, a plain old flash object isn't going to bring up MSIEs warning. It's going to be the way that it interacts with other scripting on the page or the action script that the flash file uses.

fluidstudios
08-25-2006, 04:54 AM
The method I showed activates the flash automatically so that the box doesnt appear around it. You can see it working with the flash insert on my website: www.hertfordshire-web-design.co.uk

The js file is located at :
http://www.hertfordshire-web-design.co.uk/reactivex.js


And if you view the source for that page you will see the code I mentioned just before the </html> right at the end, make sure you have put it in the same place on your pages. Give it another go as you can see it works there.





-------------------------
Web Design: www.hertfordshire-web-design.co.uk

ryani210693
08-25-2006, 07:11 AM
By saying "put the codea t then end of every page", do you mean in between the last body and html tags or what?

thanks, Ryan.

ryani210693
08-25-2006, 07:16 AM
Here's what i'm getting on the page http://www.tophitsradio.co.uk/Tester%20Page.html

Two strange erors. Hope you can help!

thanks, Ryan.

fluidstudios
08-25-2006, 09:30 AM
It took me a long to work that one out. What youve done is missed out the capital letters in reActiveX(); in the html code:

<SCRIPT src="reactivex.js"
type=text/javascript></SCRIPT>
<SCRIPT type=text/javascript>
reActiveX();
</SCRIPT>


Hopefully that will sort it.




----------------------------
Web Design: www.hertfordshire-web-design.co.uk

lgodiva
08-28-2006, 09:23 AM
Hi - I found your solution to ActiveX problems and have tried to implement your solution in my code. However, I receive the error "object expected" on the line "reActiveX();" that's added to the html document. What I am doing wrong? I copied your code verbatim. Thanks,

Selene

fluidstudios
08-29-2006, 03:47 PM
upload it and post the link and I'll have a look at it.

omeara7
10-09-2006, 08:01 PM
Thanks! Your solution worked perfectly for me....

For those who still can't get it, make sure you're referencing the right directory (where you have the javascript file saved) in the line:

...
SRC="js/reactivex.js"
...

Also make sure you uploaded the javascript file and given it the correct permissions so it can be accessed.

Thanks fluidstudios!

-Jon

felgall
10-09-2006, 08:53 PM
Note that Internet Explorer is not the only browser that requires such activation. The court ruling in favour of Eolas require that all browsers should require such activation for all embedded objects although Eolas gave Firefox an exemption due to its being open source. All other browsers such as Netscape, Opera, Safari, etc will therefore have the same activation issue (if not with the current version then with the next version once they fall into line with the court ruling).

evol_web
11-03-2006, 01:08 PM
Hi! I tried your code in my website, and it worked perfectly in IE and Firefox, but the website won't open in Netscape with the js. script that gets rid of the Active x control. It previously worked in the Netscape, too.

Any ideas?

Thanks, Evie
new web designer in Kentucky

mesalinas
02-23-2007, 01:13 PM
Thank you much!!! that worked perfect
www.sandiacasino.com



The method I showed activates the flash automatically so that the box doesnt appear around it. You can see it working with the flash insert on my website: www.hertfordshire-web-design.co.uk

The js file is located at :
http://www.hertfordshire-web-design.co.uk/reactivex.js


And if you view the source for that page you will see the code I mentioned just before the </html> right at the end, make sure you have put it in the same place on your pages. Give it another go as you can see it works there.





-------------------------
Web Design: www.hertfordshire-web-design.co.uk

sheshu
04-09-2008, 01:39 AM
i tried this, it is working but after running of this function

flash to html communication is not working

i want this please

sheshu
04-09-2008, 01:41 AM
For this i used reactiveX() function and "click to active control" disabled but

flash to html communication is not working

i want these two in one html

please help me

Thanks

SHESHU