Set value to input field onchange from other input field
I'm completely new to Javascript, and currently I'm trying to set a value to an input field triggered by an onchange event from another input field.
Code sample - input field 1:
Now I want to assign the following input field's value with the returned one from the method triggered from onchange above:
Does anyone know how this can be solved?