I have 2 text fields, the first named Price1 (id 1004), the second named Price2 (id 1006) and a total field named Total (id 1008) and I am trying to create a script to automatically put the total in the Total text field when the user changes the text in one or both of the text fields. I have looked at what I believe to be nearly all change events and have found that the on selectionChanged seems to work best but still not very good. I am trying to script an automatically totaling text field something like this:
Code: Select all
on selectionChanged
put field id 1004 + field id 1006 into field id 1008
end selectionChanged
However, the only time it changes is when the user selects the total field and I assume this is due to the script being in this field.
Is there a better simple way of doing this, something that does not require a button to initiate the event and that will automatically change the total based upon the text values in the text fields?