Skip to main content
March 30, 2016
Answered

Action button on custom dialog

  • March 30, 2016
  • 1 reply
  • 1773 views

I am very new to this but trying to learn. The task I've been given is this:

  • Have a button on a page that when pressed will open a custom dialog with 4 buttons.
  • Each button should open a different external pdf file in a new window.

I feel like it's getting close but just can't get there. Any and all help will be greatly appreciated!

var Dlg =

{

description:

{

name: "Select File To Open",

elements:

[

{

type: "view",

elements:

[

{

item_id: "Header1",

name: "Select Document To Open",

type: "static_text",

},

{

item_id: "Button1",

name: "IOM",

type: "button",

Button1:function(dialog)

         {

             app.openDoc("/IOM/IOM.pdf", this);

},

},

{

item_id: "Button2",

name: "Submittal",

type: "button",

},

{

item_id: "Button3",

name: "Owner's Manual",

type: "button",

},

{

item_id: "Button4",

name: "Test & Balance",

type: "button",

}

]

},

{

type: "ok",

ok_name: "Close"

},

]

}

};

app.execDialog(Dlg);

This topic has been closed for replies.
Correct answer try67

You can use check-boxes in your dialog where the user can select which file(s) to open, and after they close the dialog you can open the selected files.

1 reply

try67
Community Expert
Community Expert
March 30, 2016

You can't do it. Dialog objects are modal. You can't tell the app to open

new documents while they are still open.

On Wed, Mar 30, 2016 at 8:37 PM, jmarshallinc <forums_noreply@adobe.com>

March 30, 2016

Is there anything else that would work? We just don't want 4 separate buttons on the page because this will have to be done several times on each page. Thanks

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 30, 2016

You can use check-boxes in your dialog where the user can select which file(s) to open, and after they close the dialog you can open the selected files.