faqts : Computers : Programming : Languages : JavaScript : Document

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

154 of 219 people (70%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

What is "new ActiveXObject('Program.ID')" good for?

Mar 6th, 2000 00:16
Martin Honnen, Rob Wilder,


In IE4/5+ specific code or probably mostly in asp JScript or wsh 
JScript you find the call
  var someObject = new ActiveXObject('SomeProgram.ID')
This gives you a JScript wrapper object to access an active x/com 
object from your JScript code. For instance to create the 
FileSystemObject
  var fso = new ActiveXObject('Scripting.FileSystemObject');

Note that inside web pages the instantiation of active x objects is 
subject to security restrictions so the above code may fail when 
security settings in the browser don't allow it to happen. Error message
  Automation server can't create object