title: Ajax - How refresh <DIV> after submit
body: <p>How can I refresh just part of the page ("DIV") after my application releases a submit?
  I'm use JQuery with plugin ajaxForm.
  I set my target with "divResult", but the page repeat your content inside the "divResult".
  Sources:</p>
  
  <pre><code>   &lt;script&gt;      
         $(document).ready(function() {      
             $("#formSearch").submit(function() {      
                  var options = {    
                    target:"#divResult",
                    url: "http://localhost:8081/sniper/estabelecimento/pesquisar.action"  
                  }      
                 $(this).ajaxSubmit(options);      
                 return false;      
            });      
        })
     &lt;/script&gt;
  </code></pre>
  
  <p>Page</p>
  
  <pre><code> &lt;s:form id="formSearch" theme="simple" class="formulario" method="POST"&gt;      
   ...      
  
   &lt;input id="btTest" type="submit" value="test" &gt;      
  
   ...      
  
                   &lt;div id="divResult" class="quadro_conteudo" &gt;      
                       &lt;table id="tableResult" class="tablesorter"&gt;      
                           &lt;thead&gt;      
                               &lt;tr&gt;      
                                   &lt;th style="text-align:center;"&gt;      
                                       &lt;input id="checkTodos" type="checkbox" title="Marca/Desmarcar todos" /&gt;      
                                   &lt;/th&gt;      
                                   &lt;th scope="col"&gt;Name&lt;/th&gt;      
                                   &lt;th scope="col"&gt;Phone&lt;/th&gt;      
                               &lt;/tr&gt;      
                           &lt;/thead&gt;      
  
                           &lt;tbody&gt;      
                               &lt;s:iterator value="entityList"&gt;      
                                   &lt;s:url id="urlEditar" action="editar"&gt;&lt;s:param name="id" value="%{id}"/&gt;&lt;/s:url&gt;      
                                  &lt;tr&gt;      
                                      &lt;td style="text-align:center;"&gt;&lt;s:checkbox id="checkSelecionado" name="selecionados" theme="simple" fieldValue="%{id}"&gt;&lt;/s:checkbox&gt;&lt;/td&gt;      
                                      &lt;td&gt; &lt;s:a href="%{urlEditar}"&gt;&lt;s:property value="name"/&gt;&lt;/s:a&gt;&lt;/td&gt;      
                                      &lt;td&gt; &lt;s:a href="%{urlEditar}"&gt;&lt;s:property value="phone"/&gt;&lt;/s:a&gt;&lt;/td&gt;      
                                  &lt;/tr&gt;      
                               &lt;/s:iterator&gt;      
                           &lt;/tbody&gt;      
                       &lt;/table&gt;      
  
                       &lt;div id="pager" class="pager"&gt;      
                           &lt;form&gt;      
                               &lt;img src="&lt;%=request.getContextPath()%&gt;/plugins/jquery/tablesorter/addons/pager/icons/first.png" class="first"/&gt;      
                               &lt;img src="&lt;%=request.getContextPath()%&gt;/plugins/jquery/tablesorter/addons/pager/icons/prev.png" class="prev"/&gt;      
                               &lt;input type="text" class="pagedisplay"/&gt;      
                               &lt;img src="&lt;%=request.getContextPath()%&gt;/plugins/jquery/tablesorter/addons/pager/icons/next.png" class="next"/&gt;      
                               &lt;img src="&lt;%=request.getContextPath()%&gt;/plugins/jquery/tablesorter/addons/pager/icons/last.png" class="last"/&gt;      
                               &lt;select class="pagesize"&gt;      
                                   &lt;option selected="selected" value="10"&gt;10&lt;/option&gt;      
                                   &lt;option value="20"&gt;20&lt;/option&gt;      
                                   &lt;option value="30"&gt;30&lt;/option&gt;      
                                   &lt;option value="40"&gt;40&lt;/option&gt;      
                                   &lt;option value="&lt;s:property value="totalRegistros"/&gt;"&gt;todos&lt;/option&gt;      
                               &lt;/select&gt;      
                               &lt;s:label&gt;Total de registros: &lt;s:property value="totalRegistros"/&gt;&lt;/s:label&gt;      
                           &lt;/form&gt;      
                       &lt;/div&gt;      
                       &lt;br/&gt;      
               &lt;/div&gt; 
  </code></pre>
  
  <p>Thanks.</p>