Adobe LiveCycle Designer Cookbooks by BR001: Using app.execDialog() in an Adobe Designer Form
I'm following the above post and trying to do the following:
I want to write the output from one of the list box selection from the dialog box back to PDF, what shall I script?
Something like document.write() in Javascript (see: http://www.tutorialspoint.com/javascript/javascript_dialog_boxes.htm ). I've tried to use document.write() in dialog box script, but it doesn't seem to work.
Or can the dialog box return a string value?
According to the PDF sample in the first link, This dialogObject is what's returned when you see a dialog box:
var dialogObject = {
LST1: ({}),
execDialog: function() {
return app.execDialog(dialogDescriptor);
},
selectedItem: function(control) {
if (typeof(control) === "string") {
control = this[control];
}
for (var item in control) {
if (typeof(control[item]) === "object") {
var r = this.selectedItem(control[item]);
if (r !== undefined) {
return r;
}
} else {
if (control[item] > 0) {
return control[item];
}
}
}
},
};
return dialogObject;