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

How to programmatically trigger MouseUp event on a checkbox field?

Arix
Registered: Feb 17 2010
Posts: 4

Here's what I would like to do:

var f = this.getField("checkBoxField");
f.onMouseUp(); // But there's no such function

How to programmatically trigger MouseUp event on a checkbox field?

Thank you.

My Product Information:
Acrobat Standard 9.0, Windows
StevenD
Registered: Oct 6 2006
Posts: 368
If you want something to happen when a checkbox is checked you could use the isBoxChecked() method. Below is an example of a script attached to the Mouse Up trigger of the checkbox action that executes a JavaScript as the action. If the check box has not been checked then it's fill color is yellow but if it is checked then the fill color goes transparent.

var myChk = getField("Chk.HighlightMe");
if(myChk.isBoxChecked(0))
{
myChk.fillColor = color.transparent; //You could put something else between the curly braces.
}
else
{
myChk.fillColor = color.yellow;
}

StevenD

Arix
Registered: Feb 17 2010
Posts: 4
Thank you for your answer.

What I need is really calling the MouseUp method from the checkbox or triggering the event, so the related "Action" which is linked to the MouseUp event will be launch (in my this case a layer is shown).