Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one value in jsp page i.e.
session.setAttribute("sValTest", "Test");

and there is button when I click on that the value I have to change

i.e. In the Place of Test value I have to set "JAVA" and whenever I refresh the same page New Value of sValTest is now "JAVA" NOT "Test" but it Display "Test".

please help me
using JAVASCRIPT & JSP


Thank you
Posted
Comments
Altering Session value in JavaScript is not possible as far as I know. Because JavaScript is a client side language.
hareshdgr8 29-Jan-15 5:28am    
sir can you tell me can I update cookies value by javascript and how can I create cookies and use in another page please help me I stuck.
You can search in Google. You will many articles on them.
hareshdgr8 29-Jan-15 6:08am    
thank you I will check it....

try this

window.localStorage.setItem(sValTest)
 
Share this answer
 
Comments
hareshdgr8 29-Jan-15 5:25am    
sir where I write this code in javascript.
where the javascript function starts you can write this or else put the code in if condition and check sValTest whether it is JAVA OR TEST
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900