First of all, you're using Acrobat JavaScript in an XFA form, which
doesn't work.LiveCycle Designer has its own interpretation of
JavaScript, which is different to Acrobat.There is also a second
scripting language called FormCalc available.Its syntax is much easier
to learn and is matches perfectly to manipulate XFA forms.Check the help
(F1 button) in Designer to get the Designers scripting guide.