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

Viewing Javascript in secured document

wislndixie
Registered: Oct 3 2006
Posts: 125

I've found a pdf document on the internet that "highlights" each text box with a color as you tab to each box. I'd like to see the javascript that is used to accomlish this, but the document is secure. Is there anyway to veiw javascript in a secure document? If so, can someone direct me to a script that will fill the text box with a backgroud color when you tab to the box?
Mike

My Product Information:
Acrobat Pro 8.1.2, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The JavaScript for changing colors is pretty simple. The "OnFocus" and "OnBlur" events are used to set and reset the background colors.

Here's an article on using colors on PDF documents.

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/using_colors/

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

wislndixie
Registered: Oct 3 2006
Posts: 125
Thanks for your reply Thomp. I went to the article you linked in your reply but didn't see any code that covered on focus or on blur. I'm very very new at this. Is there another place you can send me to view the script?
Mike
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The article covers using colors in Acrobat JavaScript. How you use the colors, is up to you. What you are looking for is very simple, and since you are a biginner this is the perfect way for you to learn somthing about Acrobat Scripting.

Here's an article on entering scripts into form fields.
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/scripts_form_fields/

Be sure to download a copy of the Acrobat JavaScript Reference. You'll need it.
http://www.adobe.com/devnet/acrobat/javascript.php

This is everything you need.

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