java - How do i refresh a div without reload the page -


this question has answer here:

i have have 1 searchbox , submit button, want refresh div after getting value of searchbox

<form  action="/searchemp" method="post">                                 employee <input type="text" name="employeename" id="text1"/>                                 <input type ="submit" value="check"/>    </form>  <div>                <table border="1">             <thead> <h3 align="center">selected rule</h2>                 <tr>                     <th data-field="id" width="30">id</th>                     <th data-field="details" width="20">rulename</th>                     <th data-field="parameter" width="180">parameter&nbsp;|&nbsp; value &nbsp;</th>                  </tr>             </thead>             <c:foreach items="${list2}" var="as">             <tr >                 <td>${as.id}</td>                    <td>${as.rulename}</td>                 <td>                     <div>                          <table>                         <c:foreach items="${as.ruleparameter}" var="asss">                               <tr>                                 <td >${asss.parametername} &nbsp;&nbsp;|&nbsp;&nbsp;</td>                                                                    <td >${asss.parametervalue}</td>                                 </tr>                         </c:foreach>                         </table>                     </div>                 </td>                        </tr>                                        </c:foreach>         </table>     </div> 

i want keep searchbox value after submit. how this..??please me,

thank you

using xmlhttprequest can

if (window.xmlhttprequest) { // mozilla, safari, ie7+ ...     httprequest = new xmlhttprequest(); } else if (window.activexobject) { // ie 6 , older     httprequest = new activexobject("microsoft.xmlhttp"); }  httprequest.open('get', 'http://www.example.org/some.file', true); httprequest.send(); 

reference : https://developer.mozilla.org/en-us/docs/ajax/getting_started


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -