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

Mouseover/Pop-up Help verbiage

BHale
Registered: Mar 4 2009
Posts: 7

I have a form that has fields similar to:

First Name: ________ (label, input field)

On the labels I have a button with no color and no fill. That button has a Mouse Up javascript action that reads....

HelpLinks ();
function HelpLinks() {
var cMsg = "FIRST NAME";
cMsg += "\n\Your first name is the first one your Mom gave you";
var nRtn = app.alert(cMsg,0,0,"Name Help Window");
}

I would like to have that button change color or highlight when a user hovers their mouse over it, in order to get their attn.

Is that possible?

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
First, you need to place the call to "HelpLinks()" after the declaration of the fucntion.

all Acrobat form fields have mouse enter and mouse exit event. This is where you place code to turn the borders on and off.
Somthing like this:

Mouse Enter:

event.target.lineWidth = 1;

Mouse Exit:

event.target.lineWidth = 0;


You'll also need to remove it on Mouse down to cover the case where the user pressed the button
and moves the cursor outside the button before releasing the mouse button. In this case there is no mouse exit event.

event.target.lineWidth = 0;


Alternatively, you could also create a mouse over image, which can be set in the button options.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script