Setting focus in ASP
<p>I’m maintaining a site in ASP, one of the tasks is to set the focus on textbox on a page. 
Here is what I have tried:</p>

<pre><code>&lt;script type="text/javascript"&gt;
&lt;!--
document.psForm['password'].focus();
//AND
document.getElementById("password").focus();
--&gt;
&lt;/script&gt;
</code></pre>

<p>I didn't think this would work... and it doesn't:</p>

<pre><code>&lt;form id="psForm" action="logonpw.asp" method="post" defaultfocus="password"&gt;
</code></pre>

<p>This doesn't work:</p>

<pre><code>&lt;body onload="javascript:docuument.psForm.password.focus();"&gt;
</code></pre>

<p>Here is the form:</p>

<pre><code>&lt;form id="psForm" action="logonpw.asp" method="post"&gt;
    &lt;table border="0" cellpadding="5"&gt;
  &lt;tr&gt;
    &lt;td&gt;
          Password:
       &lt;/td&gt;
    &lt;td&gt;
      &lt;input type="password" name="password" value="&lt;%= password %&gt;" size="50"&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;
&lt;/form&gt;
</code></pre>
