[sf-perl] OffTopic: Any JavaScript programmers here?

Vicki Brown vlb at cfcl.com
Fri Jul 4 14:06:16 PDT 2008

I know this is a Perl list but many Perl programmers know more than one

I have a JS question and don't know where to find the answer. I want to
implement an "Undo" for a dynamic change to a page.

Please respond off list if you can help me.

The problem
Basically, I'm sorting a list with JS. It's a bullet list, converted into
an array for sorting and then back to replace the original bullet list.

I want to save the original list object or array or whatever is most
convenient before the first sort so I can put up a "put it back" button or
link. I prefer not to get involved with Cookies.

Workaround: I know I can just reload the page but that changes position
and  also takes more time.

Does anyone know of a convenient way to stash a copy of the array, or the
list object itself, grabbed originally with
      var theList = document.getElementById(ListHandle);
 into a variable that will still be there when I come back the next call
to the JS?
- Vicki

  zzZ                   San Francisco Bay Area, CA
 z  |\     _,,,---,,_   Books, Cats, Tech  
zz /,`.-'`'    -.  ;-;;,_  http://cfcl.com/vlb
  |,4-  ) )-,_. ,\ ( `'-'  http://cfcl.com/vlb/weblog
 '---''(_/--'  `-'\_)      http://twitter.com/vlb

More information about the SanFrancisco-pm mailing list