title: How to show text typed in by a user via text box in JavaScript/HTML
body: <p>I currently have this within my JavaScript code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;
          Form
      &lt;/title&gt;
  
  &lt;script type="text/javascript"&gt;
  
  var input = document.getElementById('textbox');
           function namet()
          {
          alert(textbox.value);
          }
  
  
      var input2 = document.getElementById('location');   
          function namet2()
          {
          alert(location.value);
          }
   &lt;/script&gt; 
  
  
      &lt;/head&gt;
  
   &lt;body&gt;
  
   Your name: 
   &lt;input type="text" name="FirstName" id="textbox" &lt;br&gt;&lt;br/&gt; 
  
   Your Address:
   &lt;input type="text" name="address" id="location" &lt;br&gt;&lt;/br&gt;
  
   click:
   &lt;input type="button" value="submit" onclick="namet()"/&gt;
  
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>...and was looking for a way to gather what the user types within the text box and shows them as in a single alert box when they click on the "Click" button, sort of like a confirmation. </p>
  
  <p>Additionally it would also be helpful to find out how to redirect them to a different page after clicking OK on the alert box.</p>
  
  <p>Thank you.</p>