These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Basic Javascript Help Needed

CGD
Registered: Aug 5 2008
Posts: 7

Hello -

I am extremely new to javascript. I currently have a project I need to complete in a few days requiring more javascript knowledge than I currently have so I am looking for information or to be pointed in the right direction. I am running a MAC G5 with OS10.4.11. I am using Acrobat Pro 8 but I do not have LiveCycle (don't know why....)

I am looking to take create something similar to an annotation. It would be a button that would contain a mouse over/click event that would display text in small pop up box that autosizes based on the text in the box. Every box would contain different text and I would want to include a link to a website. I would also like to vary the color of the box so I can color code them.

Any help or direction is appreciated.

Thank you

George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
LiveCycle Designer only comes with the Windows version of Acrobat.

There isn't really anything available that's like what you describe, but several approaches might be:

1. app.alert - This method displays a simple modal dialog that the user must dismiss, which could cause the browser to open a website. No control over color.

2. custom dialog - A fancier modal dialog that the user must dismiss, which could cause the browser to open a website. Limited control over color.

3. Using a tooltip text with a button. If the user clicks the button it could cause the browser to open a website. No control over color.

4. Mousing over or clicking a button causes another (previously hidden) button to display that contains the text and faux link, that when clicked could cause the browser to open a web site. Button icon can be anything a PDF page can be.

George
CGD
Registered: Aug 5 2008
Posts: 7
Thanks George.
I will look into those.
Due to time restraints, though this is very basic, what would it take to to have a button diplay basic text from a mouse enter event using Javascript?
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
> ...what would it take to to have a button diplay basic
> text from a mouse enter event using Javascript?Please describe in detail the exact type of behavior you want. For example, how does the button appear before the mouse enters, and what does it look like after? If the user clicks the button, what do you want to happen? You might also give a sample of some the text you want displayed.

George
CGD
Registered: Aug 5 2008
Posts: 7
I was actually adding additions to the question when you posted George!

The example I want to recreate is the second button "Document About Box" in Thom Parker's example here:

http://www.windjack.com/resources/Examples/DialogUses.pdf


I would like to add a button via the forms tool to specific items/areas in a PDF that will be generated by our client. The end user will then be able to press on any of these added icons and the result will be a mouse enter event (as defined when placing the button) that causes a pop up dialogue box like the one in the example PDF above to occur.I would like to include a picture and a web link exactly like this example.

Thank you
George_Johnson
Expert
Registered: Jul 6 2008
Posts: 1876
In that case, I'd suggest you contact Thom to get a copy of AcroDialogs. He gives you the code in that example, so you can try to replicate it on your own, but including images like he does in that sample is much easier with his product.

George