title: refresh text box when a particular value is matched
body: <p>I have a text box in index.jsp and after writing something i am calling a jsp by jquery. But my requirement is if a particular value will be matched in server side then how can i auto refresh that text box? It means suppose i entered <strong>apple</strong> then by onkeyup event i am sending the name(apple) to check.jsp and in this jsp page, I have kept <strong>apple</strong> in a string. So now an alert will come in index.jsp that <strong>apple</strong> already exists and simulatenously that text box will be auto refreshed. How can i do it? I am a beginner to this field.</p>
  
  <p>index.jsp</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function() {
      $("#textbox").keyup(function () {
          $.getJSON('check.jsp', {
              textboxname: this.value
          });
      });
    }); 
  &lt;/script&gt;
  </code></pre>
  
  <p>inside body</p>
  
  <pre><code>&lt;input type="text" id="textbox" name="textboxname"/&gt;
  </code></pre>
  
  <p>check.jsp</p>
  
  <pre><code>String textboxname=request.getParameter("textboxname");
  </code></pre>