Expand my Community achievements bar.

HyperLink / Label / Text OnClick Alert(Pop-Up Message)

Avatar

Level 10

Hi everyone, I'd like to know if someone knows if it is possible to have a messageBox or alert pop-up to show when someone gets to click on a hyperlink / label in Acrobat.

I have a block of text, which I have to change its content when a choice has been made. When I'm changing its content i'm loading XML into its exData value. I am looking for a way to have a hyperlink / blue text to be able to click on it and have a alert message to be shown. I tried using the alert method of javascript in a script embeded in the exData, but no success...

All I want to do is to be able to show a messageBox when a user clicks some blue text underlined..

Anyone have an idea? There's gotta me somebody that already tried something like this..


Thanks.

4 Replies

Avatar

Level 4

I have had to do this before in the past, but I am not 100% sure if you will like my method. What I did was instead of using the "Insert- Hyperlink" function, I created a button that had the same text, blue color and underline. Then I set the box to no border and 0 fill color. In the Action Builder I created an action for the button to open a webpage and then another action on that same box to open a message. To the user it looks like normal text and not a button, but it still worked for me. Granted mine was just on a webpage, but it kind of does the samething you are wanting. But I am not sure on the clicking text such as a hyperlink.

Avatar

Level 10

Hey josh,

Thanks for the reply, unfortunately I've already thought that... That is a good idea, I've already used it before and work well...

But in this case my block of text may change on change event of an option.. which may change the position of my links...The text block may have 4-10 lines, so the links won't appear at the same spot all the time....

I've already thought of changing the button's position (x, y) according to the option chosen, but it is not really the best option...

If anyone has any better idea, I'll take it...

Thanks!

Avatar

Level 10

Hi,

there is a sample by John Brinkman to edit floating fields und text objects.

It has a function called "handleEnter()" you can use to execute a script like a message box.

http://blogs.adobe.com/formfeed/2010/09/editable-floating-fields-v3.html

Avatar

Level 10

This is a good resource, going in the right way

I'm trying to find how I can exploit this method for what I'm trying to do.

Thanks for the heads up, I'll look into this.

But if you have any idea on how to insert text with an event to show a messagebox with the method you provided, that would help!

If I need any help at some point, I'll come back on this thread.

Thanks!