0

TypeError: Obj.EnableLog is not a function in firefox version 23.0.1

But in earlier firefox version my javascript code is working,

Here is my javascript code,

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");
            }
        }
    }
}

And my html code is,

<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>

This javascript code is not working in mozila firefox 23.0.1. But this code will work in earlier mozila firefox versions, Please anyone tell solution this problem. How to enable or work javascript in firefox version 23.0.1. I want to work in firefox 23.0.1.

Thanks in advance.

Arumugam
  • 3
  • 3

1 Answers1

2

I think the problem is that you are relying on non-standards behaviour to access the div by its id. You should create a reference to the div first:

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

Here is some further discussion on global id refs across different browsers:

Is there a spec that the id of elements should be made global variable?

Community
  • 1
  • 1
robC
  • 2,592
  • 1
  • 23
  • 28