Log in

View Full Version : How to prevent Internet Explorer prompt "To help protect... ActiveX control could.."



wenight
10-22-2007, 02:30 PM
How to prevent Internet Explorer prompt "To help protect... ActiveX control could.." when initialize my web page...?

BLiZZaRD
10-22-2007, 02:32 PM
Don't use active X controls. Or Java Script. Or Flash.

Otherwise you need a work around. Depending on whats on your page will determine your work around. :D

jscheuer1
10-22-2007, 03:08 PM
It depends upon why you are getting that warning. In most cases it's because of some javascript on the page, or even due to IE's proprietary style expressions or filters, any of which require certain basic Active X components to be enabled to operate.

If that's all it is, and you have the typical, or nearly typical IE setup:


Unless a user's security is abnormally tight, that only happens locally, as a security measure. As far as IE is concerned, javascript is ActiveX. Click on the bar and click on allow and click on yes. Once your page is live, this will not happen. You can also give your page 'the mark of the web'. That way (in most cases) it will not display the security bar locally either. Put this right after your <html> tag like so:


<html>
<!-- saved from url=(0014)about:internet -->
<!-- this and above comment should be removed for live, non-demo use -->
<head>

But, navigating away from the page to another local page, or including another local page on it via a frame or an iframe can be problematical if said page does not also have 'the mark of the web' on it.

djr33
10-22-2007, 06:37 PM
You cannot force an error not to display within the javascript itself, though, as this is a security measure and that would defeat the point-- like giving the prisoners keys to the prison.

jscheuer1
10-22-2007, 06:57 PM
You cannot force an error not to display within the javascript itself, though, as this is a security measure and that would defeat the point-- like giving the prisoners keys to the prison.

What are you talking about? This is that stupid local Active X warning. Just putting the page live removes it.

djr33
10-22-2007, 10:00 PM
There are a number of related errors; I'm just noting that there is no workaround in the code to disable it. <script> no_warning = 1; </script> :p

And, yes, putting it live will work. But if you don't, you can't add code that will remove the error.

jscheuer1
10-23-2007, 02:26 AM
What error?

djr33
10-23-2007, 03:46 AM
Well, notification. Warning, not error, I suppose. It IS IE, though, so it's one and the same ;)

jscheuer1
10-23-2007, 04:52 AM
Well, notification. Warning, not error, I suppose. It IS IE, though, so it's one and the same ;)

I think you are way out in left field on this one. It is a documented safety feature of the IE browser, intended to prevent code that you are unaware of from running locally without your permission.

It can easily be overridden by the method I've outlined above and in countless other places in these forums. One should only do so however, if one trusts the local content one is enabling. This is the case with a javascript like the one at issue here.

djr33
10-23-2007, 05:39 AM
Well, you're not understanding my point, and I don't really care that much. Let's just say you're right, and I'm wrong. //shrug

jscheuer1
10-23-2007, 06:07 AM
I don't think you have much of a point in this case. I will admit the whole thing is pretty stupid on a number of counts, but that doesn't make it an error.

djr33
10-23-2007, 06:23 AM
Indeed, "error" was sarcastic, and simply a word meaning "notification of problems", not to say it is explicitly defined as such by Microsoft. Security, by the browser that allows activex and has more popups than features... yeah... ;)

wenight
10-24-2007, 03:00 PM
but why the forum also use Java Script but the security message did'nt promt out........? weird.............. is it so some changing on the java script...???

jscheuer1
10-24-2007, 04:08 PM
but why the forum also use Java Script but the security message did'nt promt out........? weird.............. is it so some changing on the java script...???

http://www.dynamicdrive.com/forums/showpost.php?p=114552&postcount=3

venkat33
04-05-2012, 12:21 PM
I have tried with <!-- save url=(0014)about:internet--> to avoid activex alert but it is not working.when i tried with <!-- save url=(0016)http://localhost-->. it is working in IE7 but it is giving error message "automation server can't create object" in IE9.
Can you please help on this?

jscheuer1
04-05-2012, 01:26 PM
This is an old thread and that trick no longer works in IE. That's the bad news. The good news is that you can simply approve the tab. To do so, get rid of that comment:



<!-- save url=(0016)http://localhost-->

Load the page into IE 9. If it prompts you to approve it, do so. Once the tab is approved, you can load any local content with javascript on it into that tab.

However, the error you say you are getting:


automation server can't create object

is not the standard security warning. It might point to another problem with the page.

If you want more help, put up a live example of the page and give us a link to it.

Start a new thread too please because this one is now closed.