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

LiveCycle, JavaScript, and the length property

andresleon
Registered: Aug 4 2008
Posts: 5

Hello,
I have a pdf file i am modifying via LiveCycle designer version 8.0. I have a list of dropdowns with various values. One of these values is just three spaces to show a blank selection. When a person clicks on the drop down i wiould like the change event to see if the item selected has a value other than the three spaces. i wrote the following script under the change event of this dropdown. if the value is other than the 3 spaces then it's supposed to give a value to another numeric field:

----- F.P1.Table1[2].Row1.DropDownList3::change: - (JavaScript, client) ----------------------------
var txt = xfa.event.newText;

if (txt.length <> 0)
F.P1.Table1[2].Row1.credit.rawValue = 3;

the problem is that after the even runs the "credit" textbox doesn't change. can someone provide any feedback on what i may be doing wrong?

thank you.

Andres

My Product Information:
LiveCycle Designer, Windows
andresleon
Registered: Aug 4 2008
Posts: 5
hello again.. i noticed i was uisng the incorrect operation... the if statement should be:
if (txt.length != 0)

However after correcting this issue the problem remains. the textbox is not updated with the value 3. thanks in advanced!