title: Make functioning javascript currency converter
body: <p>Im having trouble with the following code.
  Here is the html part</p>
  
  <pre><code>     &lt;form name="convert"&gt;
  
  Choose which currency you would like to convert the Euro to:
  &lt;select id="conversionType"&gt;
      &lt;option value="polish"&gt;Polish Zloty&lt;/option&gt;
      &lt;option value="ukraine"&gt;Ukraine Hryvnia&lt;/option&gt;
  &lt;/select&gt;
  &lt;/br&gt;
  &lt;/br&gt;
  
  &lt;hr&gt;
        Amount:&lt;input id="amount" type="text" /&gt;
  &lt;input id="convertButton" type="button" value="Convert-&gt;"/&gt;
        To:
  &lt;input id="answer" type="text" name="answer" readonly="readonly"/&gt;
  
  
  &lt;/form&gt;
  </code></pre>
  
  <p>and here is the javascript code. 
  it has been changed and helped before but i cannot see why it is not working</p>
  
  <pre><code>    window.onload = initPage;
  
  var euro;
  var convert;
  
  function initPage()
  {
      document.getElementById("convertButton").onclick = calcAnswer;
      document.getElementById("conversionType").onchange = calcAnswer;
  }
  
  function calcAnswer()
  {
      //alert(document.getElementById("conversionType").value);
  
      var value1 = document.getElementById("amount").value1;
      var conversionType = document.getElementById("conversionType").value1;
      //alert(conversionType);
  
      //if(var value = document.getElementById("conversionType").value=="polish");
      //  document.getElementById("answer").value=value1 * 4.4976;
      //else
      //  document.getElementById("answer").value=value1* 10.43958;
  
  
      if(conversionType == "polish") {
          document.getElementById("answer").value1=value1 * 4.4976;
      } else {
          document.getElementById("answer").value1=value1 * 10.43958;
      }
  
  
  }
  </code></pre>
  
  <p>it will not work at all. i dont know why because i think that the theory is sound. any help wpuld be much appreciated</p>