I'm new to JSP. I have a JSP page which has a form (two text fields) on the search button, I am submitting the form and calling the Javascript function in the same JSP and in that function I have a scriptlet that connects to the database and The user resumes the data as anerelist. Now I am trying to push this array list values into javascript. When I click on the search I do not see these values in the GUI, but see the value in the source. Can anyone help me to solve this problem? I think the reason is that the page has been reloaded but how to show that data.
var UIDset = []; Var Nameset = []; Var originate = []; & Lt;% string uidValue = ""; String orgIDValue = ""; Int i = 0; If (request.getParameter ("UID")! = Null) uidValue = request.getParameter ("UID"); If (request.getParameter ("OrgID")! = Null) orgIDValue = request.getParameter ("OrgID"); RetriveUserData rs = New RetriveUserData (UIU Value, Org Value); & Lt; UserDetails & gt; L = New Arrestist & lt; & Gt; (); L = rs.performSearch (); & Gt%; For UserDetails (ud: l) {%> UIDset.push (& lt;% = ud.uid% & gt;); Nameset.push (& lt;% = ud.gName%>); OrgIDset.push (& lt;% = ud.orgVal% & gt;); & Lt;%}% & gt;
No comments:
Post a Comment