title: javascript focus() not working on Firefox and IE?
body: <p>I'm trying to appear a form and focus it, for some reason it only works on Chrome. How can I make it work across browsers?</p>
  
  <pre><code>&lt;script&gt;
  function SearchCity(evt){
      document.getElementById('ciudad-eq').style.display='none';
      document.getElementById('buscarciudad').style.display='inline';
      document.getElementById("city").focus();
  }
  &lt;/script&gt;    
  
  
      &lt;div onclick="SearchCity(event)" id="ciudad-eq" style="cursor: pointer;"&gt;
      Not from Miami?
      &lt;/div&gt;
  
      &lt;div id="buscarciudad" style="display: none;"&gt;
          &lt;form role="search" method="post" id="searchform" action="insert/insert-ip.php"&gt;
              &lt;input type="text" id="city" name="ciudad" value="¿Cual es tu ciudad?" style="width: 140px;" &gt;
              &lt;input type="submit" value="ir" style="padding: 2px 6px;"&gt;
          &lt;/form&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>You can see it not working in here:</p>
  
  <p><a href="http://jsfiddle.net/CCxrp/1/" rel="nofollow">http://jsfiddle.net/CCxrp/1/</a></p>
  
  <p>What can I do to make it work? Thanks</p>