Replace observe_field with explicit JS