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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaSript: Two ActiveX controls in one script

Status
Not open for further replies.

frohberg

Programmer
Oct 20, 2003
5
DE
Hello.

I have a JavaScript in a HTML page with two COM objects (ActiveX controls) - ADODB.Connection and WScript.Network.
One to get the hostname of the machine and one to make database actions.

If I open the browser to run this page and the script inside a message box comes up - "One ActiveX control on this side is in interaction with other elements on this side
and is not secure. Do you want to permit this?" - Sorry for my english - I've translated this from my german browser.

What can I do to eliminate this?
 
It's to do with the security settings of the browser. Because you are asking your code to perform actions which are outside the "safe" scope of activities, the browser must prompt the user for permission.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Is there another solution? I think it's better to change the code, not the security settings from the browser. My script is running on several machines - so every machine must change this settings - it's not the best way I think.
 
If you could use code to alter the security settings of a browser, it would negate the reason for having the security settings in the first place. I realise you have only the most altruistic of motives for wanting to do this, but other people would be able to use the same code to do terrible things to people's browsers.

I wouldn't use a browser that opened up it's security model for scripting.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top