Amy,
I think the following code may be
useful to automatically place the ChangeColor() function as the On-Focus and
On-Blur action for each form field:
// Enumerate through all of the
fields in the document.
for (var i = 0; i < this.numFields;
i++)
{
var f = this.getField(this.getNthFieldName(i));
f.setAction("OnFocus",
"ChangeColor();");
f.setAction("OnBlur",
"ChangeColor();");
}
According to my notes, use the
following statement if you'd rather put a rectangle around the current field:
event.target.strokeColor = color.transparent;
I'll be glad to elaborate if you'd
prefer to put a rectangle around the current field and need help.
-----Original Message-----
From: gary katz
[mailto:[EMAIL PROTECTED]
Sent: Tuesday,
December 16, 2003 9:48 AM
To: [EMAIL PROTECTED]
Subject: Re: [in] [PDF-Forms] Form
Fields
There is _javascript_ that will change the form field
color on focus and blur. Once the script is written it can be called as a
function in each form field by setting the actions in the properties tab on
focus or on blur run a _javascript_ which would be ChangeColor ();.
This _javascript_ highlights in yellow;
function ChangeColor()
{
var MyField = event.target;
color.ltYellow = new Array("RGB",1,0.994,0.820);
if(event.name == "Focus")
MyField.fillColor = color.ltYellow;
else if(event.name == "Blur")
MyField.fillColor = color.transparent;
if(event.name == "Focus")
MyField.borderColor = color.black;
else if(event.name == "Blur")
MyField.borderColor = color.transparent;
}
function printButton()
{
var MyField = event.target;
color.ltYellow = new Array("RGB",1,0.994,0.820);
color.ltGray = new Array("G", 0.751);
if(event.name == "Focus")
MyField.fillColor = color.ltYellow;
else if(event.name == "Blur")
MyField.fillColor = color.ltGray;
if(event.name == "Focus")
MyField.borderColor = color.green;
else if(event.name == "Blur")
MyField.borderColor = color.black;
}
function tab()
{
var MyField = event.target;
if(event.name == "Focus")
MyField.borderColor = color.transparent;
else if(event.name == "Blur")
MyField.borderColor = color.transparent;
}
Hope this works for you.
Gary
At 05:25 AM 12/16/2003 -0800, you wrote:
Here is my question. I have been converting
numerous Word forms into Adobe and I have two problems:
1. When a form is converted it seems like all of the text is somewhat
compacted. It looks as though the spacing between lines, paragraphs, and
words is minimized. Many of my co-workers felt that the print was to
small. Each time I convert I use "Convert to Adobe from
File". Anyone have any ideas on how I can keep the sizing the same?
2. Another question my co-workers posed after reviewing various converted
Adobe forms was, "Is there a way to highlight where the form fields are
located?" As an example, in Word a form field takes on a light gray
appearance which makes it easy for users to know where they need to type.
In Adobe you can change the color of the text field but if you do so that color
or shading shows up once the finished form is printed. Any suggestions?
I just want to say thanks to all of you who have helped me in the past couple
of weeks. Without your advice I would be in some trouble. If my questions
seem elementary I apologize but thanks for the assistance.
Amy
Do you Yahoo!?
New
Yahoo! Photos - easier uploading and sharing