Session in client side

Hello,

I have a page. In that I am showing dropdown list. According to the values I am viewing the tables. When I am selecting values from the dropdown, it renders a table & views it. Everything is happening on client side. When I refresh the page, it goes to the fist value in the dropdown (rather I should be in the last selected dropdown value). How can I manage this in client side session ?

Thanks

Hello,

I have a page. In that I am showing dropdown list. According to the values I am viewing the tables. When I am selecting values from the dropdown, it renders a table & views it. Everything is happening on client side. When I refresh the page, it goes to the fist value in the dropdown (rather I should be in the last selected dropdown value). How can I manage this in client side session ?

I don't understand what you mean by client side session. If you mean how to use the session variable in rails then have a look at the Rails Guide on Active Controller, it has a section of the use of the session variable.

While you are at it work through all the other guides, they will answer many of your questions.

Also work right through a tutorial such as railstutorial.org which will introduce you to the basics of Rails.

Colin

Here is my code :-

I have here my Table 1
I have here my Table 2
I have here my Table 3

So, if Iam in 2nd value in the dropdown. & I do a refresh page. It comes to the first.

1) set the value on the server on select and get it back on page reload 2) save it to a cookie 3) save it to HTML5 Local Storage