Focus on textfield and place marker at end of text with JS
<p>Following js look for the textfield q in queryform and focus it:</p>

<p><strong>js:</strong></p>

<p><code>if($("#queryform").length){
        document.queryform.q.focus();
    }</code></p>

<p><strong>html:</strong></p>

<pre><code>&lt;form id="queryform" name="queryform" action="" method="post"&gt;&lt;input type="text" name="q" /&gt;&lt;/form&gt;
</code></pre>

<p><strong>current function</strong></p>

<p>In chrome: textfield is found and focused and text is highlighted</p>

<p>In FF and IE: textfield is focused and marker is placed at the back</p>

<p><strong>wanted function</strong></p>

<p>Same in all browsers: textfield is focused, text not highlighted, marked at the end of the text</p>

<p><strong>jquery</strong></p>

<p>I already use jquery on the site so a neat jquery solution is preferable</p>
