# onotherchange attribute

Type: | action
Inherited: | no
Used By: | input
See: | editable type

The onotherchange attribute can be set on input elements of type "text", or "select" when editable is true, to run a specific action when another field in the form is changed. This allows the value field to be "calculated" based on the contens of the other fields in the form, and is commonly done with read-only fields.

This shows three fields, with the third one being the result of some total of the first two.

    <input type="text" name="field1"/>
    <input type="text" name="field2"/>
    <input type="text" readonly="true" onOtherChange="javascript:calculateTotal(field1, field2)"/>