title: Why does javascript not work on Google Chrome?
body: <p>I've been facing a problem with javascript into JS page and since I'm a newbie on it I can't figure out why this code works on Firefox but not on Google Chrome.
  I'd be very thankful if someone can help me with this problem.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  function showFC(form) {
  
      var selElem = document.getElementById(form);
      var selIndex  = selElem.selectedIndex;
  
      document.form1.S4.options[0] = new Option("C=1",1);
      if(selIndex==0) {
          for(var i=0;i&lt;10;i++) {
              var val = (i+1)+0.5;
              document.form1.S4.options[i+1] = new Option(val,val);
          }
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>It doesn't create dynamically elements into the select when it clicked by a button.</p>
  
  <p>Here my html code:</p>
  
  <pre><code>&lt;form name="form1" method="post" action="ComputeResult"&gt;
       ... other things
       ....
       ....
     &lt;select name="S4" id="S4" onclick="showFC('S4')"&gt;
        &lt;option value="1"&gt;FC&lt;/option&gt;
        &lt;option value=""&gt;&lt;/option&gt;
     &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>