java - How do i refresh a div without reload the page -
this question has answer here:
- how use servlets , ajax? 7 answers
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 | value </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} | </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
Post a Comment