title: Get input text field from HTML into JavaScript and go to URL
body: <p>How get input text field from HTML into JavaScript and go to URL?</p>
  
  <p>I'm building one WebPage where you type some word into the input field and the Java gets this string and check if this string is equal to another, if it is go to some URL.</p>
  
  <p>My code is:</p>
  
  <pre><code> &lt;input type="text" name="procura" id="procura" /&gt;
    &lt;script&gt;
    name = oForm.elements["name"].value;
  
    if (name.equals("Advogados"))
   {
       window.location = "http://jornalexemplo.com.br/lista%20online/advogados.html"
       //do something
   };
    &lt;/script&gt;
  </code></pre>
  
  <p>Can you give me some lights?</p>