• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Setting ActiveX properties from HTML

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">
</OBJECT>

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?  

Thanks,
-Unnur
0
unnurg
Asked:
unnurg
  • 2
1 Solution
 
LazyStudentCommented:
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.
0
 
unnurgAuthor Commented:
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 :-)
-Unnur

PS - yeah, I know opening unregistered activeX is bad, but since it's my own code, I feel OK about it...
0
 
LazyStudentCommented:
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:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/hta/hta_node_entry.asp
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now