There is really no concept of sessions in javascript.
At most you can use session cookies (cookies can store lot of data, i forgot the
limit though) but really depends on how much you are trying to store in them.
But, from your brief description of the problem, why do you need to store in
session?
Just declare 2 variables, and keep updating them on every click (with the image
you are on) and then send an ajax request to fetch the comments.
________________________________
From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org on behalf of
Divya Khullar
Sent: Thu 5/10/2007 11:21 PM
To: Ruby on Rails: Spinoffs
Subject: [Rails-spinoffs] How to update Session Variable using JS
Hello,
I am displaying set of images with JS using next and previous images.
I want to display stored comments for each image. I am thinking of
updating Session variable as a way to pull up respective comments. Is
there a way of updating session variable in JS.
If you think i should follow another approach pleaes guide me.
D
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---