Quantcast
Channel: Adobe Community: Message List - Acrobat SDK
Viewing all articles
Browse latest Browse all 10848

Re: javascript dialog box close button functionality is not working.

$
0
0

This is more of a JavaScript question than an SDK question...

 

I would use an external variable, like this:

 

var userResponse = "";

var dialog1 = {

     // dialog definition

}

 

And then inside the dialog object insert these functions:

 

ok: function(dialog) {

     userResponse = "ok";

},

 

cancel: function(dialog) {

     userResponse = "cancel";

}

 

And then you execute the dialog and examine the value of userResponse, instead of the return value of the execDialog function, like so:

 

app.execDialog(dialog1);

if (userResponse=="ok") {

 

} else if (userResponse=="cancel") {

 

} else {} // do nothing


Viewing all articles
Browse latest Browse all 10848

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>