0

I have this input text:

<input name="mytbox" id="mytbox"
onchange="Modify(this.value);" type="text" value="Surname Name">

When I set the field from an external procedure it doesn't trigger the change event.

obj = document.getElementById(id);
obj.value = valore;

The value is correctly changed, but not the trigger. How can I bind an event to trigger in this case?

Thanks

Keegs
  • 460
  • 6
  • 12
Max Bertoli
  • 614
  • 5
  • 25

1 Answers1

0

Call the method Modify after changing the value. Try like this

obj = document.getElementById(id);
obj.value = valore;
Modify(obj.value);
Madhavi
  • 474
  • 2
  • 7
  • 20