You'll want to use the onUpdate event in the Sortable class.  I am
pretty sure there are a bunch of serialize functions that you can use
to stash data about a Sortable.  You could put the serialized data
into a cookie and parse it on window load to reoganize the sortables
so they look just as the user had left it.

On Aug 23, 3:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Sorry, i'm new to javascript/ajax but how would i go about saving the
> state of a sortable element on page refresh?
>
> currently i have a menu that is sortable, so i can drag and drop it
> and then move it into a new position.
>
> however, i'm not certain how to save it.  I would assume it would
> involve cookies(as i will want it to be on seperate visits as well), i
> also have a mysql database, so if that would work as well for storing
> it for longer periods of times.
>
> But i'm not sure when to create the cookie, what to store in it, and
> then how to load it for the application so it will load on page
> load(the site is in php if that helps).
>
> Again, sorry for the inexperience, but I haven't been having much luck
> yet.


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to