title: this.text Function
body: <p>I have a inline function that works fine.  When the link is clicked it puts the text into the textField: </p>
  
  <pre><code> &lt;a href="#" onclick="document.getElementById('textField').value =(this.text);"&gt;someText&lt;/a&gt;
  </code></pre>
  
  <p>What i want to do is be able to call the above as a function instead of writing it inline.  Example:</p>
  
  <pre><code>function setValue() {
        document.getElementById('dd').value =(this.text);
  }
  </code></pre>
  
  <p>and be able to call it like so:</p>
  
  <pre><code>&lt;a href="#" onclick="setValue();"&gt;someText&lt;/a&gt;
  </code></pre>
  
  <p>I thought it would be simple but for some reason it is not work and giving me error in firebug. I think it has something to do with "this.text" being called from a function instead of inline.  Thanks for any help.</p>