Print Search Rate
    
   03-27-2008, 4:49 AM
How To: Detect if ActiveX Viewer is installed on client browser.
Attachment: ActiveXChecker.zip
It is sometimes necessary to check wether client browser has ActiveX viewer installed or not. The simplest way to do this is to try to create new ActiveXViewer control object using JavaScript in the window_onload event. The following JavaScript code will attempt to create new ActiveXViewer object and return true on success:

function checkARActiveXviewer(){
    control = null;
    try {
        control = new ActiveXObject('DDActiveReportsViewer2.ARViewer2.1');
    }
     catch (e) {
        //Do nothing;
    }
    if (control) {
        return true;
    }
    return false;
}

Sample application is attached.

Applies To:
ActiveReports 1.0
ActiveReports 2.0
ActiveReports for .NET 1.0
ActiveReports for .NET 2.0
ActiveReports for .NET 3.0
GrapeCity » Knowledge Base » KnowledgeBase f... » How To: Detect if ActiveX Viewer is installed on client browser.
Privacy Policy | Copyright © 1997-2010 - GrapeCity, inc.