Hello everyone,
I need to change the value of a jsp variable in javascript.
I have got this code in my .jsp page:

<c:set var="searchType" value="jobsearch" />

the value of the "searchType" should change depending on which link the user click on.
I though if I put this variable in a session its better. what I mean is I will swap this code with:

<jsp:scriptlet>
WebUtils.setSessionAttribute(request, "searchType", "jobsearch");
</jsp:scriptlet>

now, I dont know how to change the value of this session in javascript. can anyone answer me please?

Thanks
Zoe

You can't. The JSP runs on the server, JavaScript on the client. The only thing you can do is set a parameter and submit a form (or something to that effect).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.