cancel
Showing results for 
Search instead for 
Did you mean: 

Error:Permission denied to access property "documentElement"

former_member187977
Participant
0 Kudos

Hi,

I am trying to integrate webSigner Applet using Portal components. I

created a Portal application standalone project and a portal component

of

type "JSPDynPage". I have a JSP by the name "emas.jsp" in my project.

The

code of "emas.jsp" is attached with this incident. The console of

Browser

is reading a error "Permission denied to access property

"documentElement". Because of this error, I beleieve, I not able to

access DOM elements by document.GetElementById() method of javascript.

The screenshot of the error is attached with this incident. The first

error relating permission occurs on the load of the JSP and the other

one

"TypeError:document.GetElementbyId(...) is null" occurs when I click on

"FormSign" button on my JSP. Please suggest appropriate solution.


thank you !

seventyros

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187977
Participant
0 Kudos

JSP Code

<HTML><%@ taglib uri="htmlb" prefix="hbj" %>

<jsp:useBean id="formBean" scope="application" class="pdfSigner.FormBean" />

<script src="/org.mstd~signer/scripts/deployJava.js"></script>

<script>

var websignerapplet;

var websignerapplet1;

function websignerPopUp()

  {

var tbs = document.getElementById("name").text;

var signform = document.frmsubmitDSC;

if(tbs != '')

{

websignerapplet = document.websignerapplet;

alert("hi" + tbs);

websignerapplet.open(tbs , "sign", "emasSubmit()", "emasCancel()");

}

else

{

alert('Please enter username to Sign');

return false;

}

  }

function emasSubmit()

{

var signData = websignerapplet.getGeneratedSignature();

document.getElementById("signData").text=signData;

var commonName = websignerapplet.getCommonNameOfSigner();

document.getElementById("cn").text=commonName;

  }

function emasCancel()

{

alert('emas cancelled');

  }

</script>

<script>

  function close()

  {

  alert('ererer');

  }

</script>

<div id="javaRequiredDiv"></div>

<script>

var contextPath = "/org.mstd~signer/scripts/Client_comp.jar";

if( deployJava.versionCheck("1.6+")==false ) {

var java_message = 'Websigner requires JRE1.5 or higher. Please download it from <a href="http://10.80.100.146:8088/websigner4.0/jre6u21.exe">Click here</a> to download jre. <br>Once Installation is done. Close the browser and relogin.';

if (document.all) {

javaRequiredDiv.innerHTML=java_message;

} else if (document.getElementById){

rng = document.createRange();

el = document.getElementById("javaRequiredDiv");

rng.setStartBefore(el);

htmlFrag = rng.createContextualFragment(java_message);

while (el.hasChildNodes()) {

el.removeChild(el.lastChild);

}

el.appendChild(htmlFrag);

}

} else {

var attributes = {

code :'emas.WebsignerApplet.class',

archive : contextPath,

width :1,

height :1,

name : 'websignerapplet'

};

var parameters = {

MAYSCRIPT : 'true',

scriptable : 'true',

enableExpiryCheck : 'true',

  regexFilterIssuerName : ""

};

var version = '1.5';

deployJava.runApplet(attributes, parameters, version);

}

</script>

<hbj:content id="myContext" >

  <hbj:page title="PDFSIGN">

  <hbj:form id="myFormId" >

  

  

<hbj:textView id="name" text="Test text"></hbj:textView>

<input type="button" value="FormSign" onClick='websignerPopUp()'>

<hbj:button id="Send_Button" text="Approve" tooltip="Approve" onClick="onApprove"></hbj:button>

<hbj:inputField

  id="signData"

  type="STRING"

  design="STANDARD"

  width="250"

  maxlength="30"

  />

  

  <hbj:inputField

  id="cn"

  type="STRING"

  design="STANDARD"

  width="250"

  maxlength="30"

  />

  </hbj:form>

  </hbj:page>

</hbj:content>

</HTML>