title: Call a JavaScript function name using a string?
body: <p>How can I hook up an event to a function name I have defined as a string?</p>
  
  <p>I'm using Prototype.js, although this is not Prototype-speficic.</p>
  
  <pre><code>$(inputId).observe('click', formData.fields[x].onclick);
  </code></pre>
  
  <p>This would result in JavaScript complaining that my handler is not a function. I would prefer not us use <code>eval()</code>.</p>