0

TypeError: Obj.EnableLog は 、Firefox バージョン 23.0.1 の関数ではありません

しかし、以前のFirefoxバージョンでは、私のjavascriptコードは機能しています.

ここに私のJavaScriptコードがあります、

document.write('<applet code="BiomAPI.Legend.class" width="0" height="0" archive="BiomAPI.jar" id="Obj"></applet>');

document.write('<script language="vbscript" type="text/vbscript" src="LegendScript.vbs"> </script>');

function GetFeature (sUserID,iFingerID)
{
    if(navigator.appName == "Microsoft Internet Explorer")
    {
        vbscript:vGetFeature (sUserID,iFingerID,hdnVerifyFeature);
    }
    else
    {
        if(hdnVerifyFeature==null)
            alert("Invalid Hidden Field Argument Passed");
        else
        {
            document.getElementsByName("Verify")[0].value = "";
            var lsFeature = null;

            Obj.EnableLog(0);
            Obj.WindowTitle("Sample");
            Obj.LocalFilePath("C:\\IMAGE\\");
            Obj.EnableEncryption(1);
            Obj.SessionID("abcde");
            Obj.TimeStamp("Wednesday");
            Obj.SaveImage(1);
            Obj.GetFeature(sUserID,iFingerID);
            lsFeature = Obj.Feature();  
            lsImage = Obj.StringImage();
            Obj.WindowTitle("");

            if (lsFeature != null)
            {
                document.getElementsByName("Verify")[0].value = lsFeature;
            }
            else
            {
                alert("Fingerprint not captured");
            }
        }
    }
}

そして、私のhtmlコードは、

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>

<body>

    <script language="javascript" type="text/javascript" src="LegendScript.js"> </script>

    <table id="tableid" width="500" style="height: 100">

        <tr align="center">
            <td>
                Verification</td>
        </tr>
        <tr>
            <td>
                Verification Template</td>
            <td>
                <input type="text" name="Verify" id="hdnVerifyFeature" runat="server" /></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <input type="button" id="btnRecog" value="Recognition" style = "width:150" onclick="GetFeature('0','0')" /></td>
        </tr>
    </table>


</body>
</html>

この JavaScript コードは、mozilla firefox 23.0.1 では機能しません。しかし、このコードは以前の mozilla Firefox バージョンでも動作します。この問題の解決策を誰か教えてください。Firefox バージョン 23.0.1 で JavaScript を有効にする方法、または動作させる方法。firefox 23.0.1 で作業したいです。

前もって感謝します。

4

1 に答える 1

2

div問題は、IDでアクセスするために非標準の動作に依存していることだと思います。div最初への参照を作成する必要があります。

var Obj = document.getElementById("Obj");

以下は、さまざまなブラウザーでのグローバル id ref に関する詳細な説明です。

要素の id をグローバル変数にする仕様はありますか?

于 2013-08-22T13:14:41.673 に答える