title: Trouble with Ajax (creating a <select> dynamically
body: <p>I'm new to Ajax, and Im just loving it. Really nice.</p>
  
  <p>but i stucked in this <code>&lt;select&gt;</code> thing, so whats the problem?
  I have a js function that allows the user to Register a new product dynamically..
  So when he is in the product area, theres a button that when clicked, just creates a FORM, where he can add a new product. By now, im doing well, but, i got this field CITY.</p>
  
  <p>So, I need no generate a <code>&lt;select&gt;</code> with all the cities I have on my mySql table.</p>
  
  <p>The first thing Im doing is accessing the database and geting the quantity of cities, I think Im making this confuse so...</p>
  
  <pre><code>cities = document.createElement('select');
  cities.setAttribute('class','coolButton');
  Cities = new Array();
  ajax = new Ajax();
  ajax.doGet('pegacidade.php?act=1',GiveCitiesQty);
  </code></pre>
  
  <p>This works just fine, I get the quantity of cities.</p>
  
  <pre><code>GiveCitiesQty = function (str) {
      ajax.doGet('pegacidade.php?act=2&amp;id='+j,PegaNomeCidade);
      //Cities[i] = document.createElement('option');
      //Cities[i].setAttribute('value',i);
      //Cities[i].appendChild(document.createTextNode((2009+i).toString()));
      //cities.appendChild(Cidades[i]);
  }
  </code></pre>
  
  <p>This is where I stucked, i dont know how to create this <code>&lt;select&gt;</code> dynamically.</p>
  
  <p>Any sugestions? (for now im trying not to use any toolkit, for the real learning)</p>
  
  <p>Thanks, Jamfi.</p>