Expand my Community achievements bar.

"event.target.hostContainer is undefined" with signature fields

Avatar

Level 4

I got LC-Designer ES4 Vers. 11. In Acrobat XI (and possibly all other viewers) I have this problem:

Whenever I access a subform containing a signature field  (for example like this):

var oBlockSignatureEKB = xfa.resolveNode("Exportcontrol.blockWithSignatures.blockSignatureEKB");

console.println("setVisibilityOfSignatureEKB: [" + oBlockSignatureEKB.name + "]");

then I get in JavaScript-Debugger this error message

event.target.hostContainer is undefined

126:1

TypeError: event.target.hostContainer is undefined

126:1

Apparently the code quits working beyond this point.

Why is this?

How can I prevent it or get around this error?

Accessing subforms without a signature field I do not have this kind of problem at all.

3 Replies

Avatar

Level 3

why complicating things just use image filed better , user can insert image as eletrocnic signature and you can set codes as below to pop up messages if it's null :

if (this.rawValue == null || this.rawValue == "")

{

app.alert("Please insert your signature first");

}

Avatar

Level 4

I am afraid that won't help.

I do not plan to pop up message boxes.

The code I wrote in my question is actually stripped down to the minimum to visualize the problem:

Accessing a subform containing a signature field throws an error message.

That might be an issue of LiveCycle - or has some other reason. I was hoping someone else has come across this behaviour as well and can explain it. The best thing would be of course if someone knew a way of accessing such a subform without provoking an error message.

Avatar

Level 6

Where is the code that references the hostContainer property placed and can you post the code?