Can I submit a request through jquery using $.get and use the returned result as it returns from normal submition to server,
here's what I mean, I want to make page navigator for all users in the system, I want to show 10 users per page, for the first time I request the page, the servlet returns 10 users and I show then like this
<c:forEach items="${requestScope.AllUsers}" var="user" varStatus="loop">
<tr class="userRow">
<td class="numberWidth">${loop.index + 1}</td>
<td class="nameWidth user" id="${user.userno}">${user.fullName}</td>
<td>
<c:choose>
<c:when test="${user.active == true}">
<button name="DeactivateBtn" id="deactivate" class="deactivate btn">تعطيل</button>
</c:when>
<c:when test="${user.active == false}">
<button name="ActivateBtn" id="activate" class="activate btn">تفعيل</button>
</c:when>
</c:choose>
</td>
</tr>
</c:forEach>
when user click on the next page button, I sent request to servlet through jQuery
var param = {
"page": "ViewUsers",
"from": page_index * items_per_page,
"to": (page_index * items_per_page) + items_per_page
};
$.get("InstitutionManagementServlet",param);
and it calls the same method that returns different users depending on the range I sent, the problem is that, for second request to servlet the users are not appear as the first time, even in consol shows that the return list has users values?
Does that have a concern of sending request using jquery???