locked
Can i use javascript to determine if the user has HD Viewer installed or not, else prompt him to download the viewer. RRS feed

  • Question

  • I know this is somewhere there in the js from HDViewer but i want to give the user the option before hand.
    Wednesday, July 25, 2007 1:30 AM

All replies

  • Hello,

     

    This is going to change sometime next week when we release a Firefox version.  In the meantime if you want to get your page tested, I recommend just copying the following function out of our Javascript example and using it.  Unfortunately you can't call ours directly because it is buried in the hdvHost object.  We should probably change our javascript so that you can just call this directly.  Also the script snippet below is IE specific.

     

     function isHDViewInstalled()
     {
      var installed = false;
      try
         {
       var hdvCntrl = new ActiveXObject("Viewer.ViewCtl");
       installed = true;  
         }
      catch (e) {}
      return installed;
     }

     

    Friday, July 27, 2007 5:01 PM
  • Thanks for putting this On Rafi....

     

    Thursday, September 20, 2007 7:53 PM
  • This is a bit cleaner in the new javascript.  You can now do:

     

    hdvHelper.isHDViewInstalled()   // to determine if HDView is installed on the system

     

    hdvHelper.isPlatformSupported()  // to determine is HDView is supported on the current platform/browser 

     

    Thursday, September 20, 2007 9:32 PM