Skip navigation
Currently Being Moderated

Is there an event that fires when adding attachments

Apr 5, 2012 7:44 AM

Tags: #script #event #attachments

Is there some way to add JavaScript to run when a user attaches a file?

 
Replies
  • Currently Being Moderated
    Apr 10, 2012 3:15 AM   in reply to Steve Bishop

    Hi,

     

    There is not event that fires, but you could control the JavaScript to add the attachment using the importDataObject (see the Acrobat JS API Reference document for details), if you don't specify the cDIPath parameter it will display a dialog.

     

    You could then run additional JavaScript after you have made the above call, the function returns true if it was able to import the file and therefore you could use this to control if you run you code or not.

     

    The Acrobat JS API reference document can be downloaded as part of the SDK from here - http://www.adobe.com/devnet/acrobat/sdk/eula.html

     

    or the online version is here - http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/JS_API_Acr oJSPreface.87.1.html

     

    To use the 'doc' object from acrobat in LiveCycle Designer change the 'doc' part to 'event.target'

     

    Hope this helps

     

    Malcolm

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points