title: refresh a specific div on jsp page and not whole page
body: <p>i want to refresh a div on the basis of input ...here is a sample code:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=windows-1256"
      pageEncoding="windows-1256"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1256"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="button" id="1" value="1" onClick="javaScript:update('1');"/&gt;
  &lt;input type="button" id="2" value="2" onClick="javaScript:update('2');"/&gt;
  &lt;%
  int value=1;
  %&gt;
  &lt;div id="refresh"&gt;
  &lt;%=value %&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
  
  function update(input)
  {
          value=input;
          alert(value);
  }
  
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>so here is what i want when page loads it will print 1 as value is initialized with 1 but if i click 2 i want that div to print 2 whose value gets updated in update function of java script ...i don't want to refresh whole page just want to refresh that div ...i don't want to use JQUERY.load as it loads the whole page in div i just want to refresh that div</p>