These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

switching readonly attribute

The X
Registered: Mar 27 2011
Posts: 24

var a = this.getField("VIC_ORIGIN");
 
if (a.value == "test"){
getField("VIC_REL").readonly = false;
}
else {
getField("VIC_REL").readonly = true;
}
 
Whatever I select in "VIC_ORIGINE" triggers the "else" part of this logical test....What's wrong?

My Product Information:
Acrobat Pro 10.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
When focused on a field there is a difference in the values returned by this.getField("VIC_ORIGIN").value and the event.value. If you are dealing with the focused field, you need to use the 'event.value' object and property.

Event processing sequence is explained in the Acrobat JS API Reference.

George Kaiser