Previous | Next | (P-PDF) Forms & FDF
Topic: Highlighting a text field when cursor enters
Conf: (P-PDF) Forms & FDF, Msg: 29212
From: Jub
Date: 10/26/2001 09:26 AM
Catherine,
Depending on the version of Acrobat you are using...
Go to Tools -> Forms -> Doc Level Javascripts
or
Tools -> Javascript -> Doc Level Javascripts
Add the name of your script ('ChangeColor')
and click add/edit...
Paste in the script and save out.
Now go to a field in Form Tool mode.('F')
Open up the Field Properties box
(double click or right click and choose properties)
Under the Actions tab click on 'onFocus', then 'Add',
and hit 'J' to get the Javascript option.
Click 'Edit' and type/paste in the call to
your function - e.g.
ChangeColor();
Add another Javascript action in the onBlur event.
To use the setFocus method, find the name of the field which you would like the user to start on...
Then either make this the first field in the tab order
Tools -> Forms -> Fields -> Set Tab Order
or set a set a Page Action to move the focus to this field.
Document -> Set Page Action -> Page Open...'Add' etc
and put in the following lines...
var FirstField = this.getField("FirstFieldName");
FirstField.setFocus();
If you have the onFocus action in that field calling your doc level function, when the page opens that
field will miraculously turn yellow....
HTH,
Jub