3 Replies Latest reply on Jan 13, 2011 11:27 AM by msmitty52@hotmail.com

    Javascript Sum

    msmitty52@hotmail.com Level 1

      Hi,

       

      I need to have a field in a form that sums the data entered by the user in 5 other fields, and one defined field.  It's super easy to do in Acrobat 9.0, but I need to create the form in LiveCycle and the JavaScript wont transfer from Acrobat to Livecycle.  Here is what I have and it isn't working:

       

      AFSimple_Calculate("SUM", new Array ("LineCalc1", "LineCalc2", "LineCalc3", "LineCalc4", "LineCalc5", "StudentLoan"));

       

      A separate field needs to subtract the value from that calculation from 30,400:

       

      event.value = ( 30400 -
          this.getField("Total_Proposed_Payment_Toward_Tuition_Room_and_Board").value )

       

      I am a complete beginner at JavaScript.  I have tried to figure this out, but I really just don't know where to go! Please help! Thank you.