Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

hyperlinks in a pop message

rickstsx04
Level 3
Level 3

Is there a way to add a hyperlink within the message of a pop-up message?

6 Replies
_Bruce_Robertson
Level 10
Level 10

Hi,

You can use the execDialog method, http://help.adobe.com/livedocs/acrobat_sdk/11/Acrobat11_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?h...

So this code displays a model dialog with a "click here for more help" (with 'here' being a hyperlink)

function dialog()

{

    var dialogDescriptor =

    {

        description:

        {

            name: "dailog1",

            elements: [

                {

                    type: "view",

                    align_children: "align_row",

                    elements: [

                        {

                            type: "static_text",

                            name: "Click",

                        },

                        {

                            type: "link_text",

                            item_id: "LINK",

                            name: "here",

                        },

                        {

                            type: "static_text",

                            name: "for more.",

                        }

                    ]

                },

                {

                    type: "ok",

                }

            ]

        }, 

        "LINK" : function(dialog)

         {

             app.launchURL("https://www.google.com/search?num=5&q=help", true);

         },

     };

     var dialogObject =

     {

         execDialog: function() { return app.execDialog(dialogDescriptor); },

     };

     return dialogObject;

} 

 

var d = dialog();

d.execDialog();

I tested this code in this form https://sites.google.com/site/livecycledesignercookbooks/home/Hyperlink.Dialog.pdf?attredirects=0&d=...

There's also some other examples here, Adobe LiveCycle Designer Cookbooks by BR001: Using app.execDialog() in an Adobe Designer Form

Regards

Bruce

radzmar
Level 10
Level 10

It's possible using a dialog object but not with app.alert() or xfa.host.messageBox() methods.

Here's great tool to design such dialog objects.

Adobe LiveCycle Designer Cookbooks by BR001: Using app.execDialog() in an Adobe Designer Form

dcidev
Level 8
Level 8

Hi Bruce,

I didn't even know about the link_text element type. How did you find out about that? Is there a Acrobat 11 JS API reference out there I don't know about?

Thanks!

Kyle

_Bruce_Robertson
Level 10
Level 10

Hi Kyle,

I had forgotten that the link_text was one of the undocumented types.  There are a number of undocumented options but Adobe uses them also, if you are in the Acrobat debugger and type IWShareFileConfirmDialog you will see the source for one of their functions that use it.  I came across most snooping around with the debugger but I've come across other examples that use different fonts, backgrounds, etc and have written a few samples in my blog, Adobe LiveCycle Designer Cookbooks by BR001: execDialog

Regards

Bruce

rickstsx04
Level 3
Level 3

thank you for your input,

I have another question, can I add line breaks in the text of the pop-up message?

Thanks,

Ricky

Magus069
Level 10
Level 10

Hi there,

I think what you are looking for is "\n"...

I know for a fact that \n add line breaks, even tho there is one place where you cannot use this character for line break within LiveCycle Designer..

Hope this help!