S_a_k_Uの日記みたいなDB

~サクゥーと呼ばないで~

インストールされているActiveXを実行する

Brava! Desktopがインストールされていれば、Brava! Desktopを実行し、Brava! Desktopがインストールされていなければ、Brava! DWG Viewerを実行する。
というような動作をさせたい場合は embedタグを使ってみる。
ActiveXが実行できない場合のアイコン表示を避けるため、ポジション指定で上書きするような形で実現してみた。

<HTML>
    <body>

<div style="position:absolute;left:100px;top:100px;width:640px;height:480px;">
    <object style="position:absolute;left:0px;top:0px;width:100%;height:100%;" ID="ctlBravaDesktop" classid="CLSID:BB3259D6-52FC-4820-898E-15411424DCCD">
        <embed id="ctlNoBravaDesktop">
            BravaDesktopがインストールされていません。<br>
            <object style="position:absolute;left:0px;top:0px;width:100%;height:100%;" id="ctlFreeDwgViewer" classid="CLSID:1BE73243-A85F-4385-939D-14D4845A286A">
                <embed id="ctlNoFreeDwgViewer">
                    FreeDwgViewerがインストールされていません。<br>
                </embed>
            </object>
        </embed>
    </object>
</div>

    <body>
</HTML>