There are various ways this might be done, depending on whether the current page should be replaced by a different one,a nd whether the parameters are part of a link clicked by the user or part of an HTML form. Can you tell us a bit more about the circumstances?
Actually its an jsp page, In this page there are many hidden fields with ids, which are made visible by calling js functions, which are called on onclick. My job is to make an array in which i have save the ids of these hidden fields and save in a session object, so that when i come back to this page again, the hidden fields are in visible state.
One way could be this - You can set the values in hidden "input" fields which are in the same html form that is submitted. You can retrieve these values on the server using request.getParameter("fieldName"); or request.getParameterValues("fieldName") and send them back to the page.
Joined: Jan 06, 2008
Thanks, Actually i knew this method but wanted an another way, Any way thanks, i just want to ask is there any way by which i can directly access a js variable in a servlet?
Joined: Mar 22, 2005
is there any way by which i can directly access a js variable in a servlet?