tags:

views:

95

answers:

2

I am attempting to persist what the users enters into a textbox without them clicking save. It would simply save what the user entered into the textbox so when they navigate away and then back to the page it will be reloaded. once they are click "done" the session will be removed.

I have been trying to do this with Jquery but I have been struggling as I am fairly new to JavaScript, can anyone point me in the right direction?

A: 

You can use a cookie to store textbox value. A nice tutorial how to use cookies is here

RaYell
+1  A: 

You can use the onChange event of the textbox to call your save routine everytime the user changes the text; alternatively you can run a saving function every while using the setTimeout javascript function. Like RaYell said, you can store your values inside a cookie. If you use JQuery, you can take advantage from http://plugins.jquery.com/project/Cookie which offers super simple ways to read and write cookies.

m.bagattini