jsp - Submit the form using jquery and use the result as it returns as request atttribute -
Can I submit a request through jquery to $ and use the returned result because it is normal Returns to the server from submission,
What I mean here, I want to create a page navigator for all users in the system, I want to show 10 users per page, for the first time when I request a page I am servlet 10 user And I'll show it then like it
& lt; C: for each item = "$ {requestScope.AllUsers}" var = "user" varStatus = "loop" & gt; & Lt; Tr class = "userRow" & gt; & Lt; Td class = "numberwidth" & gt; $ {Loop.index + 1} & lt; / Td> & Lt; Td class = "nameWidth user" id = "$ {user.userno}" & gt; $ {User.fullName} & lt; / Td> & Lt; TD & gt; & Lt; C: Select & gt; & Lt; C: when test = "$ {user.active == true}" & gt; & Lt; Button name = "disable BTN" id = "idle" class = "passive BTN" & gt; ØªØ¹Ø · Ù ?? Ù ?? & Lt; / Button & gt; & Lt; / C: When & gt; & Lt; C: when test = "$ {user.active == incorrect}" & gt; & Lt; Button name = "activate btn" id = "active" class = "active btn" & gt; ت٠?? ع٠?? Ù ?? & Lt; / Button & gt; & Lt; / C: When & gt; & Lt; / C: Select & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / C: foreach & gt; When the user clicks on the next page button, I sent a request for servlet via jQuery
var param = {"page": "ViewUsers", "from": page_in index * items_pages, "to": (page_index * items_page_page) + items_per_page}; $ .Get ("InstitutionManagementServlet", Ultimate); And it calls the same method that returns to different users based on the limit I sent, the problem is that for the first time, Due to non-appearance, even
< P> Itemprop = "text">
here, $ ("Institution Management Servelet", Ultimate); You are not managing the response to everyone's request. A callback function is missing. So whatever the subnet is returning, is not completely ignoring. You need to add a callback function to handle the response:
$ ("Institution ManagementServlet", Ultimate, Function (Feedback) {// Handle Here. Example, insert data into desired location.}); See also: -
-
Update : Therefore, you want to send a synchronous GET request using javascript actually (for example, changing the current page location altogether)? You can use window.location for this. window.location = "Installation ManagementServlet?" + $ .most (ultimate); See also: -
-
Comments
Post a Comment