title: JavaScript Can't retrieve value of options from select drop down
body: <p>OK I have a select object that I am creating and it creates properly with my form when I generate it but when I add in the code to retrieve the value from the select I am getting an error that it is null. The code I am using to get the value pretty cookie cutter to what I've seen here so I am confused. Below is the code for the select with the options and the code to grab the values I'm not seeing the issue any help is greatly appreciated.</p>
  
  <pre><code>var tools = document.createElement('select');
  tools.id = 'sTools';
  tools.name = 'sTools';
  form.appendChild(tools);
  
  var option = document.createElement('option');
  option.value = '33';
  option.appendChild(document.createTextNode('Forge'));
  tools.appendChild(option);
  
  option = document.createElement('option');
  option.value = '1391';
  option.appendChild(document.createTextNode('Workbench'));
  tools.appendChild(option);
  
  option = document.createElement('option');
  option.value = '1753';
  option.appendChild(document.createTextNode('Oven'));
  tools.appendChild(option);
  
  
  
  
  var e = document.getElementById("sTools");
  var cTool = e.options[e.selectedIndex].value;
  </code></pre>
  
  <p>any help is greatly appreciated.</p>