title: Javascript to convert lowercase to upper case
body: <p>What is wrong with the following htmla and javascript code</p>
  
  <p><strong>formToConvert.html</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;ExampleToConvert&lt;/title&gt;
          &lt;script type = "text/javascript" src = "con.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt; 
          &lt;form id ="myform"&gt;
              &lt;input type = "text" id = "field1" value = "Enter text Here"/&gt;&lt;br/&gt;
              &lt;input type ="submit" value = "submit" onclick = "convert()"/&gt;
          &lt;/form&gt;
      &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>con.js</strong>  </p>
  
  <pre><code>function convert() 
  {
      var str ;
      str = document.getElementById("field1");
      document.writeln(str.toUpperCase());
  }
  </code></pre>
  
  <p>Why is the above code not giving me the desired result?</p>