Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

hyperlinks in a pop message

Avatar

Level 3

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

6 Replies

Avatar

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

Avatar

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

Avatar

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

Avatar

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

Avatar

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

Avatar

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!