2

「オブジェクトはこのプロパティまたはメソッドをサポートしていません」は JavaScript から発生し、Liferay ポータルのアプレットからのメソッドの呼び出しを処理する行で停止します

JavaScript スニペット:

<script type="text/javascript">
    function processSigning(){
        var applet = document.applets["SignApplet"];
        var path_to_certificate = document.getElementById("certificate").value;
        var pass = document.getElementById("password").value;
        var filePath = document.getElementById("documentSign").value;
        applet.filePath = document.getElementById("documentSign").value;

        //at this line, call of method from applet, javascript stops, but applet has this method
        //and it's public
        applet.profileTestPKCS12(path_to_certificate, pass);

        document.getElementById("file").value = applet.getDocumentString(filePath);
        document.getElementById("sign").value = applet.getSignString();
        document.getElementById("cert").value = applet.getCertificateString();
        document.forms['mainForm'].submit();
//        document.getElementById("mainForm").submit();


    }
</script>

アプレットの html のスニペット:

<APPLET name="SignApplet" mayscript code="SignApplet.class" archive="<%=renderResponse.encodeURL(renderRequest.getContextPath() + "/lib/SignApplet.jar")%>, <%=renderResponse.encodeURL(renderRequest.getContextPath() + "/lib/crypto.tsp.jar")%>, <%=renderResponse.encodeURL(renderRequest.getContextPath() + "/lib/crypto.gammaprov.jar")%>" height=500 width=500 style="display:none;">
    <PARAM name="boxmessage" value="Please wait, while applet is loading">
</APPLET>
4

2 に答える 2

2

アプレットでは、display:none の使用を避ける必要があります..... u が none として定義されている場合、ビジュアル メディアでは、要素はボックスを生成せず、レイアウトには影響しません。 ...

于 2012-05-03T04:19:13.730 に答える
2
<APPLET name="SignApplet" ... style="display:none;">

'display' プロパティに関する W3C 。

(値)なし
この値により、要素は書式設定構造に表示されません (つまり、視覚メディアでは、要素はボックスを生成せず、レイアウトに影響しません)。子孫要素もボックスを生成しません。要素とそのコンテンツは、フォーマット構造から完全に削除されます。

于 2012-05-03T04:03:07.557 に答える