title: Showing Text-box after Button click event
body: <p>I'm trying to generate a text-box after a button click event. The code is as follows. </p>
  
  <pre><code>&lt;div id="welcomeDiv"  class="answer_list" &gt; WELCOME &lt;/div&gt;
  &lt;input type="button" name="answer" value="Show Div" onclick="showDiv()" /&gt;
  &lt;/div&gt;
  &lt;?php if(isset($_POST['button'])) { ?&gt;
  &lt;?php echo "&lt;script type=\"text/javascript\"&gt;
     function showDiv() {
  
     &lt;input type="text" id="textInput" value="..." /&gt;
     document.getElementById('welcomeDiv').style.display = "block"; &lt;/script&gt; ";
     }
     &lt;/script&gt;" ?&gt; ;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>But the button click event function is not working properly. Any thoughts?</p>