Need complete javascript to display form field as empty when divisor is zero
I am making a simple fill in form in Acrobat XI.
I have a sum from one field that I wish to divide by a number that is entered by the person filling in the form, to result in a cost per participant.
I'm using Simplified Field Notation for the division:
Total_Funds/Participant_Count = Cost_per_Participant
for which the person filling in the form enters a number in the Participant_Count field.
I seek the complete JavaScript to enable the Cost_per_Participant field to display as empty (not NAN) until a divisor is entered in the Participant_Count field.
I need some sort of "if" statement and I don't know how to code JavaScript.
Thank you!