Hi All,I am developing an AIF (Adobe Interactive Form) where I have to attach two files on an Interactive Adobe Form.
I am putting two fields and their respective individual BROWSE buttons on the form. I am writing JavaScript on the click even of BROWSE buttons.The issue is when the second file is selected it is overwriting the previously attached file. In other words in the Attachment tab on the Adobe Page, the first file is getting replaced by second one as soon as the second file is selected.
As per the requirement Below is the code that I am writing on CLICK event of BROWSE button.
var sFile;
event.target.importDataObject(sFile);var oFile;
oFile = event.target.getDataObject(sFile);
this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
Every helpful reply would be appriciated!!!
Thanks,
Pallavi
The first argument to the "importDataObject()" function is the name of the attachement, i.e., it's unique identifier in Acrobat. If you use the same name for two files then the second one will overwrite the first. Is "sFile" a different value for both? I see where "sFile" is defined, but where is it's value set?
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script