hyperlinks in a pop message

Avatar

Avatar

rickstsx04

Avatar

rickstsx04

rickstsx04

30-07-2015

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

08-08-2015

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

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

08-08-2015

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

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

19-08-2015

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!

Avatar

Avatar

rickstsx04

Avatar

rickstsx04

rickstsx04

19-08-2015

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

Avatar

_Bruce_Robertson

MVP

Avatar

_Bruce_Robertson

MVP

_Bruce_Robertson
MVP

11-08-2015

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

Avatar

dcidev

Avatar

dcidev

dcidev

11-08-2015

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