Previous | Next | (P-PDF) Forms & FDF
Topic: Highlighting a text field when cursor enters
Conf: (P-PDF) Forms & FDF, Msg: 27668
From: kjfish
Date: 9/27/2001 03:59 AM
Problem:
How to let the user know where he/she is in a form
that contains a lot of text fields.
One Idea:
As the user tabs through the text fields the fill color
of each text field changes from white to a light
yellow when the cursor enters the field then
changes back to white when the cursor moves to
the next field.
One Solution:
I used the On Focus and On Blur actions for each
of the fields.
Here is the code I used for the On Focus action so
the color would change to a light yellow (kind of a
Post-It note yellow).
color.theColour = new
Array("RGB",1,0.994,0.820);
this.getField("TextBox.2").fillColor =
color.theColour;
Here is the code I used for the On Blur action so
the color would change back to white.
color.theColour = new Array("RGB",1,1,1);
this.getField("TextBox.2").fillColor =
color.theColour;
So far I have just been working with just 3 text
fields to get this to work. And it does seem to work.
But it also seems like it would be a lot of work to
copy these scripts to each action in each field if
there were several dozen fields in the form. And
then if I wanted to change the color? Well, even
more work.
In know the user could check the 'Highlite Form
Fields' box in Preferences but a lot of folks here at
the office wouldn't know to do that.
Is there a better way to do this.