Unable to rename action button from value of app.response.
I am trying to rename the action button using the response given from the "app.response" entry. This value will be used not only to rename the action button but will also be used to fill in a form field on the spawned document.
I am using a windows based computer - the code I have written works except I can't figure out how use the variable generated by the user response to change the button label and to be used to populate other fields in the document.
// If button is Clicked and the hidden check box is not checked - the Analyzer1 check-off pages will be spawned;
var cb2 = this.getField("CB2").value;
// Assign Templates to be spawned a variable so they may be recalled;
var a1a = this.getTemplate("Analyzer1A");
var a1b = this.getTemplate("Analyzer1B");
var a1c = this.getTemplate("Analyzer1C");
var a1d = this.getTemplate("Analyzer1D");
if (cb2 != "Yes"){
var resp1 = app.response(" Enter The Analyzer Serial Number.");
if ((resp1 != null)||(resp1 !="")){
this.getField("Anal1").buttonSetCaption(resp1);
a1a.spawn({nPage:this.numPages-1,bRename:false,bOverlay:false});
a1b.spawn({nPage:this.numPages-1,bRename:false,bOverlay:false});
a1c.spawn({nPage:this.numPages-1,bRename:false,bOverlay:false});
a1d.spawn({nPage:this.numPages-1,bRename:false,bOverlay:false});
this.getField("CB2").checkThisBox(0,true);
}}
else{
app.alert ("Documentation For Analyzer 1 Has Already Been Created.");
}
