Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we maintain a javascript variable in session

 
rachana ravali
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am new to javascript and java.Please help i am having the following problem :
i have to set a variable when any change is made in a jsp page.
i am using onChange for that and calling a javascript function to set the variable.
problem is that i have to maintain the value as changed (if any data in the table is changed) even if the user goes to some link like help and return back to the table page.

thanks in anticipation.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There really isn't a good way of doing this with just Javascript. You are going to need to get that data available on the server to persist in some way (Session maybe). Without knowing more details about what you are actually doing it's hard to give you a good solution. Ajax *might* work here, but I hate to say anything for sure without more information.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
possible answers are: a. client, b. server.

1) Where is the javascript engine?

2) Where is a JSP parsed/translated?

This may seem very basic, sorry. We'll get to the answer.

- whoops, fixed a link.
[ May 16, 2007: Message edited by: Garrett Smith ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic