title: Javascript Events: Getting notified of changes in an <input> control value
body: <p>I have the following problem:</p>
  
  <p>I have an HTML textbox (<code>&lt;input type="text"&gt;</code>) whose contents are modified by a script I cannot touch (it is my page, but i'm using external components).</p>
  
  <p>I want to be notified in my script every time the value of that textbox changes, so I can react to it.</p>
  
  <p>I've tried this:</p>
  
  <pre><code>txtStartDate.observe('change', function() { alert('change' +  txtStartDate.value) });
  </code></pre>
  
  <p>which (predictably) doesn't work. It only gets executed if I myself change the textbox value with the keyboard and then move the focus elsewhere, but it doesn't get executed if the script changes the value.</p>
  
  <p>Is there another event I can listen to, that i'm not aware of?</p>
  
  <p><br /><br /></p>
  
  <p>I'm using the Prototype library, and in case it's relevant, the external component modifying the textbox value is Basic Date Picker (www.basicdatepicker.com) </p>