Try
this:
for
(var i=0;i < this.numFields; i++){
var x=getField(getNthFieldName(i));
x.setAction('OnFocus','highlight_it(' + '"' + getNthFieldName(i) + '"' + ')');
x.setAction('OnBlur','unhighlight_it(' + '"' + getNthFieldName(i) + '"' + ')');
}
var x=getField(getNthFieldName(i));
x.setAction('OnFocus','highlight_it(' + '"' + getNthFieldName(i) + '"' + ')');
x.setAction('OnBlur','unhighlight_it(' + '"' + getNthFieldName(i) + '"' + ')');
}
function highlight_it()
{
event.target.fillColor=color.yellow;
}
function
unhighlight_it()
{
event.target.fillColor=color.transparent;
}
{
event.target.fillColor=color.transparent;
}
Copy
the above code, paste into the Console in the _javascript_ menu(select
Tools, then _javascript_, then Console), then Ctrl A to select all, and hit Enter
key. It should insert those highlight functions in all the
fields.
Tam
-----Original Message-----
From: Amy Sachs [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 12:27 PM
To: [EMAIL PROTECTED]
Subject: [PDF-Forms] Same _javascript_ for All Fields
From: Amy Sachs [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 13, 2004 12:27 PM
To: [EMAIL PROTECTED]
Subject: [PDF-Forms] Same _javascript_ for All Fields
Hello everyone! I really hope you can help me. I have designed a form which has many fields on it. To help users fill it out I would like the field to be highlighted in color when someone tabs into it. I have the code and now I am just having a problem getting the code to show up in all the fields. I have done this once before a long time ago and of course now I'm suck. If I can avoid entering this script for each individual field it would save me a ton of time. Any help would be great and Tim G. if you're out there you helped me with this one before! Thanks ahead of time.Thanks,Amy
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today
