title: Javascript focus() and select() quirk
body: <p>Im working on a form and getting null or not an object errors in ie.</p>
  
  <pre><code>&lt;form action="#" method="post" name="adv_search"&gt;
  
  &lt;input class="inputbox" type="text" name="keyword1" value="none" id="keyword1"/&gt;
  &lt;/form&gt;
  
  &lt;script&gt;
  document.adv_search.keyword1.focus();
  document.adv_search.keyword1.select();
  &lt;/script&gt;
  </code></pre>
  
  <p>//whereas if I use</p>
  
  <pre><code>&lt;script&gt;
  var key1 = document.getElementById('keyword1');
     key1.focus();
     key1.select();
  &lt;/script&gt;
  </code></pre>
  
  <p>//everything is fine</p>
  
  <p>i would like to understand why.
  i would like it to work without having the id tag for the input field</p>
  
  <p>thanks in advance</p>
  
  <hr>
  
  <p>shouldnt the document.formname.fieldname.focus(); 
  and document.formname.fieldname.select(); 
  work?</p>