Setting ActiveX properties from HTML

Posted on 2003-02-22
Medium Priority
Last Modified: 2010-04-09
I wrote an ActiveX control that I would like to embed in a web page. However, there are some properties that need to be set such as background color, filename to use, and fog color.  Supposedly I can set these properties in HTML using code like this

<OBJECT ...random stuff...>
<PARAMETER NAME=filename VALUE="test.wrl">

I wrote a test HTML file that does this and everything works fine if I then open that file locally in Internet Explorer. However, if I copy that HTML file to a server or a remote machine and open it in IE remotely, the properties are not set correctly.  I'm pretty sure that my activeX control is written correctly because setting properties works fine when I embed the object in a Power Point presentation, or open an HTML file locally.  Does anyone have any idea why this might be happening?  

Question by:unnurg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

LazyStudent earned 300 total points
ID: 8000888
Yeah, it is security issue. Since you open local html - you have more permissions and I guess you have permission to initialize ActiveX on local pages.
When you upload html file from sever - it is internet zone and different security settings.

You can check these settings in IE: Tools->Internet Options -> Security -> Custom Level

BTW - opening not registered activeX from HTML pages is not healthy thing at all.

Author Comment

ID: 8000932
I knew it was something silly like that!  I haven't tried it yet, but I'm pretty sure that sounds right on. Thanks so much - you just saved me hours of frustration :-)

PS - yeah, I know opening unregistered activeX is bad, but since it's my own code, I feel OK about it...

Expert Comment

ID: 8002252
It is not threat for developer at all since he knows what he uses.
Imagine user that in order to see your page have to open his computer for dangerous ActiveX and user sure will not aware what is going on in object you writed.

On my computer this settings always set "Initialize and script ActiveX object that not marked as safe" to promt.
So when some object is used on page - I am aware of it. But  i am never open such a page.

Another thing if you develop some HTML to be used as a program. But you have another way in order to workaround almost all security settings: HTM-Application.
Save your html file with activeX as file with extension hta - it will behave like a real program. ( But forget about web then - user will have to download it like a program and run it manually ).
Information about HTML Application you can find here:

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question