Skip to main content
флорианб70160451
Known Participant
October 2, 2016
Question

app.popUpMenu() PDF form

  • October 2, 2016
  • 1 reply
  • 1666 views

Hello All,

I would like to implement a popup-menu in my PDF form. By choosing options in the popup-menu the PDF reader should have the possiblity to open attached files in a new window.

Based on following javascript, attached files "Option1.pdf" etc. in accordance to user`s choice should be opened in a new window.

var cRtn = app.popUpMenu("Option1","Option2","-","Option3","Option4");

Any comments and ideas are highly appreciated.

Best regards

Florian

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 2, 2016

After that line of code add something like this:

this.openDataObject(cRtn + ".pdf");

флорианб70160451
Known Participant
October 2, 2016

Hello try67,

many thanks for your prompt reply. In accordance to user`s choice different PDF attachements should be opened in a new window.

For this reason in my opinion an "if" command is necessary. Furthermore how I could make sure that the attached PDF will be opened in a new window?

As I am pnot professional java script programmist, I would be very grateful, if you could help me with the java scriting.

Best regards

Florian

try67
Community Expert
Community Expert
October 2, 2016

You can't specify how the file is opened in the script. That depends on the application.

And I don't see a need for an if-statement. The line of code I provided takes the user's selection and tried to open the attached file that matches it. Isn't that what you wanted?