title: Trigger onChange Event for Created in Loop Selects
body: <p>I have <code>select</code> dropdowns which are created in loop and an <code>onchange</code> event is triggered when an option is selected. <code>get()</code> function is an <code>ajax</code> call.</p>
  
  <p>HTML code:</p>
  
  <pre><code>  &lt;select id="id1" name="name[]" onChange="get(1)"&gt;
    &lt;option&gt;....&lt;/option&gt;
    &lt;/select&gt;
    &lt;select id="id2" name="name[]" onChange="get(2)"&gt;
    &lt;option&gt;....&lt;/option&gt;
    &lt;/select&gt;
    &lt;select id="id3" name="name[]" onChange="get(3)"&gt;
    &lt;option&gt;....&lt;/option&gt;
    &lt;/select&gt;
  </code></pre>
  
  <p>ajax code:</p>
  
  <pre><code> url = "ajax.php?item=";
      function get(id) {
          var sId = document.getElementById("id"+id).value;
          http.open("GET", url + escape(sId) + "&amp;did="+id, true);
          http.onreadystatechange = function() {   
                  if (http.readyState == 4) {
                      if(http.status==200) {
                          var results = http.responseText;
                          document.getElementById("showdiv"+id).innerHTML = results;
  
                          document.getElementById('ajaxdiv'+id).style.display = '';
                          document.getElementById('showdiv'+id).style.display = '';
                          document.getElementById('price'+id).focus();
  
                      }
                  }
              }
          http.send(null);
      }
  
      function getHTTPObject() {
          var xmlhttp;
  
          if (window.XMLHttpRequest) {
              xmlhttp = new XMLHttpRequest();
          } else if (window.ActiveXObject) {
              xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
              if (!xmlhttp) {
                  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              }
  
          }
          return xmlhttp;
  
  
      }
      var http = getHTTPObject();
  </code></pre>
  
  <p>This works fine when I select manually, what I want now is, this should all trigger by itself on the page load.   </p>
  
  <p>I tried with <code>window.onload</code> but only one and the first option shows up. What should I use to trigger all onchange events.</p>