This is still pretty rough, but it illustrates the use of local storage for an approach to student class notes:

http://chemagic.com/JSmolVMK2.htm

Local storage is being used on two control button screens on this page - Draw and Notes-Misc.

On the Draw button screen, 10 JSME structures can be saved/retrieved to/from local storage.

On the Notes-Misc button screen, 10 Jmol models can be saved/retrieved to/from local storage. There is also a text area for student notes. Student notes in this area are auto saved to local storage as they are typed. This screen also has back-up and erase links for local storage. The back-up link produces cut/paste JSON text that can be used to transfer the data to another browser/computer or simply saved as a text file for data back-up (instructions on Jmol echo window). The erase link erases local storage for this domain. I can envision notes being archived in files according to topic and being loaded as needed.

Like I mentioned before, this storage is analogous to cookies, but the storage limit is about 5Mb. Ten cholesterol models, ten cholesterol structures, and pages of blah blah blah notes took up a trivial amount of total space allowed.

The data is persistent until erased or replaced. The auto saved notes reload when the page is opened in the browser of the original save or when a back-up JSON is loaded into a new browser.

There is some error checking, but I still have a lot of work to do on this. The code for working with local storage is amazingly simple to use. I'm interested in any feedback on how various browsers and platforms respond to all of this.

Otis

--
Otis Rothenberger
[email protected]
http://chemagic.com

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to