Skip to main content
флорианб70160451
Known Participant
Oct 2, 2016 3:02 PM UTC
Question

app.popUpMenu() PDF form

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 is closed to new replies. Start a new post to keep the conversation going.

9 replies

try67
Community Expert
Community Expert
Oct 2, 2016 3:14 PM UTC

After that line of code add something like this:

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

Translate
флорианб70160451
Known Participant
Oct 2, 2016 3:21 PM UTC

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

Translate
try67
Community Expert
Community Expert
Oct 2, 2016 3:31 PM UTC

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?

Translate