ActiveX failed! How to control? 
Author Message
 ActiveX failed! How to control?

Hello,

Id like to control if an ActiveX Control really was initialized. Following
Script I used:

    var obj = new ActiveXObject("ProgID");
    if(obj == null) alert("Error found!");

But this doesnt do the job! The error comes up before the if-statement!
Does anyone have an answer?

CIAO
Michael, http://www.*-*-*.com/



Sat, 24 May 2003 03:00:00 GMT  
 ActiveX failed! How to control?
On the server with JScript 5 or 5.5 installed you can do
  try {
    var obj = new ActiveXObject('ProgID');
  }
  catch (e) {
    Response.Write('error');
  }
If you are sure the browser has JScript 5 installed you can do
   try {
    var obj = new ActiveXObject('ProgID');
  }
  catch (e) {
    alert('error');
  }
The problem is IE4/JScript 3 throws an error on the try/catch statement

Quote:

> Hello,

> Id like to control if an ActiveX Control really was initialized. Following
> Script I used:

>     var obj = new ActiveXObject("ProgID");
>     if(obj == null) alert("Error found!");

> But this doesnt do the job! The error comes up before the if-statement!
> Does anyone have an answer?

> CIAO
> Michael, http://www.videotricks.de

--

        Martin Honnen
        http://javascript.faqts.com/
        http://home.t-online.de/home/martin.honnen/jsgoddies.html



Sat, 24 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ActiveX control fails in Jscript

2. ActiveX Control Container for VBCCE5 ActiveX Controls!?

3. Building ActiveX controls that will access activex.dll running on PWS

4. Script Control in VC++ fails

5. Script hosting of VB5 controls fails

6. (ANN) Sophist Solutions releases ActiveLedIt! 3.0 ActiveX Control - Easy to use word processor ActiveX control available

7. An ActiveX control on this page might be unsafe to interact with other parts of

8. ActiveX control in DIV container with Z-order

9. Calendar ActiveX control

10. Activex controls and IE 6

11. Calendar or ActiveX Control on html page

12. Click event on ActiveX control

 

 
Powered by phpBB® Forum Software