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

Edit Borders individually using javascript

Shankar
Registered: Jan 30 2007
Posts: 2

Hi,
This is regarding LiveCycle Designer v7.1.
How do I change the border color of a button individually using javascript?
At the mouseDown event I need to set the left and bottom border colors and in mouseUp event the top and right.

My Product Information:
Acrobat Standard 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
For this you'll need to dig into the XML for the field. First, the button border has to be set to "Edit Indiviually" and any 3D border type remove. Each edge needs a separate color or with value. Now click on the XML view and you'll see how the border edges are organized. Use the XFA Node and Tree functions to dig into this structure and change the values a runtime. You may need to kick the rendering engine a bit to get it to redraw the borders after the change. For example, change the size of the button slightly. I havn't tried this so I don't know what the limitations are.

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