Amy,

 

Try making the following function a document-level function by selecting Tools, _javascript_, Document _javascript_s:

 

function ChangeColor()
{
var MyField = event.target;
if(event.name == "Focus")
            MyField.fillColor = color.gray;
else if(event.name == "Blur")
            MyField.fillColor = color.transparent;
}

Run the following code from the _javascript_ console to automatically place the ChangeColor() function as the On-Focus and On-Blur action for each form field.  I still use Acrobat 5 for which the procedure is to press <Ctrl-J> to display the _javascript_ console, paste in the following code, highlight the code to execute, and press the <Enter> key by the number pad.

// 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();");

}

 

-----Original Message-----
From: Amy Sachs [mailto:[EMAIL PROTECTED]
Sent:
Tuesday, December 16, 2003 11:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [in] [PDF-Forms] Form Fields

 

Are all of these scripts necessary or were you trying to show me how to do different colors?  I would like my fields to be highlighted in gray.  Also, I am using Adobe 6.0 Professional so under what tab should I be entering the custom _JavaScript?  Action, Format, Calculate?  I am still a beginner/novice when it comes to _JavaScript.  Thanks for all of your help.

 

Amy 

gary katz <[EMAIL PROTECTED]> wrote:

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


Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Reply via email to