Copy link to clipboard
Copied
hello a query, I have a bookmark which I want to have two actions, the first would be an alert and the other to open a file .....
Can it be done using javascript? to save time
Copy link to clipboard
Copied
hello a query, I have a bookmark which I want to have two actions, the first would be an alert and the other to open a file .....
Can it be done using javascript? to save time
Copy link to clipboard
Copied
JavaScript can only create JS-based actions, and only one of them.
You can do both things in a single JS-action, though.
Copy link to clipboard
Copied
to ok where can i look for information to do that
Copy link to clipboard
Copied
This forum is an excellent resource... Try searching it for relevant keywords.
Also, see: Adobe - Acrobat Developer Center | Adobe Developer Connection
Copy link to clipboard
Copied
var CustomAlert =
{
result:"cancel",
DoDialog: function(){return app.execDialog(this);},
initialize: function(dialog)
{
var dlgInit =
{
"img2":
{
"width":100,
"height":33,
offset: 0,
"read": function(bytes){return asdf.slice(this.offset,this.offset+=bytes);}
},
"stat": "Usted esta por abrir un archivo que fue firmado digitalmente por el GCBA\nEl cual contiene un archivo adjunto con el libro de sueldo correspondiente",
};
dialog.load(dlgInit);
},
commit: function(dialog)
{
var oRslt = dialog.store();
},
mylk:function(dialog){ app.launchURL("www.infobae.com.ar");},
description:
{
name: "Custom Alert",
elements:
[
{
type: "view",
elements:
[
{
type: "view",
align_children: "align_top",
elements:
[
{
type: "image",
item_id: "img2",
width: 100,
height: 33,
char_width: 4,
char_height: 4,
},
{
type: "static_text",
item_id: "stat",
width: 220,
height: 64,
alignment: "align_fill",
font: "dialog",
bold:"true"
},
]
},
{
type:"button",
item_id:"mylk",
name:"WWWW.infobae.com.ar",
},
{
type: "ok",
ok_name: "Continue",
},
]
},
]
}
};
// Example Code
if("ok" == CustomAlert.DoDialog())
{
}
this is the code I have for the alert, how can I make the accept button open a pdf file?
so I do not have to create two actions, so I have
Copy link to clipboard
Copied
if ("ok" == CustomAlert.DoDialog()) {
app.openDoc("/C/Temp/SomeFile.pdf");
}
Copy link to clipboard
Copied
ok muchas gracias
Copy link to clipboard
Copied
ok muchas gracias