title: HTML5 Canvas text not appearing
body: <p>I am trying to display a text on a canvas by entering a message in a textbox but it's not appearing.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;canvas id="myCanvas" width="600" height="400"&gt;&lt;/canvas&gt;
          &lt;input type="text" name="fname" size="50" id="form_val"&gt;
          &lt;button onclick="clicked()"&gt;Submit&lt;/button&gt;
  
          &lt;script type="text/javascript"&gt;
              function clicked () {
                  var x = document.getElementById("form_val");
                  return x.value;
              }
  
              var c = document.getElementById("myCanvas");
              var ctx = c.getContext("2d");
              ctx.font = "25px Verdana";
              ctx.fillText(clicked(), 250, 250);
          &lt;/script&gt;       
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>