title: Putting cursor at end of textbox in javascript
body: <p>I have a textbox that when I put on focus I want the cursor to goto the end of the textbox.</p>
  
  <p>The solution that keeps coming up is just </p>
  
  <pre><code>this.value = this.value
  </code></pre>
  
  <p>I have tried this with a simple method onclick:</p>
  
  <pre><code>function InputClicked(element) {
      element.className = "inputfocused";
      element.value = element.value;
  }
  </code></pre>
  
  <p>but the strange this with this, it seems to goto the end and then jump to the start of the textbox.</p>