Hello Everyone,
I am usually pretty good at figuring these things out, but I am not sure what to do. I am trying to get a button in LiveCycle to run a JavaScript which will add a text box. Essentially, the user will click the button if they need to write additional comments. It would take a while to explain why I need this, but suffice it to say that we are trying to save room on the form. I am putting in the following into a Script Object:
var g=this.getField("txt1-3-1");
if ( g==null ) {
var f=event.target;
var myRect=f.rect;
var deltaX=-18;
var deltaY=-60;
var widthTxt=60*3;
var heightTxt=3*12;
myRect[0]=myRect[2]+deltaX;
myRect[3]=myRect[1]+deltaY;
myRect[2]=myRect[0]+widthTxt;
myRect[1]=myRect[3]+heightTxt;
var f=this.addField("txt1-3-1", "text", this.pageNum, myRect);
f.delay=true;
f.multiline=true;
f.strokeColor=color.black;
f.value=" ";
f.delay=false;
} else this.removeField("txt1-3-1");
This coding works perfectly in eCopy PDF Pro Office. Button is created, everyone is happy. Technically what is happening is when I go to the button to add an action I have the condition set to when button is clicked. When I go to the result however, I click on "Call Script Object". I click "object", click the appropriate item. Then it says "function" with a drop down menu next to it. Nothing is ever in the drop down menu. I know it must be some formatting thing I am doing wrong, but I don't know. Any guidance or suggestions would be appreciated. Thanks for any thoughts.