These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Dialog Load from External Source

srprice
Registered: Sep 19 2007
Posts: 138
Answered

Is it possible when executing the dialog.load command that it can link to and populate from an external file?

Here is a snippet of my code:

var myDialog =

{
initialize: function(dialog)
{
dialog.load({
"sub1":
{
"User1": -1,
"User2": -2,
}
});
}

I would like to have sub1 populate external file. Is this even possible.

Sarah

My Product Information:
Acrobat Pro 8.1.2, Windows
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
Have you considered the importTextData JavaScript method, or using ADBC?

George
srprice
Registered: Sep 19 2007
Posts: 138
I have looked at the importTexData but that inserts the file into the PDF as an attachment. I need to keep the file separate.

Sarah
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
The importTextData method of the Doc object loads a line of data from a text file into one or more text fields. You could then read the contents of the fields (which would probably be hidden) to get the values for your list box items.

The importDataObject method may be what you were thinking about.

George