This forum post has been removed
Number of replies: 6One way to do this would be to turn your HTML + JS + CSS into a 'SCORM package'. If you do that, then your JavaScript can communicate with Moodle (or any other SCORM-compliant LMS) and store things like that array you want to store.
If you Google "SCORM tutorial" then that seems to find some things.
This forum post has been removed
This forum post has been removed
The adlnet page you linked to has some samples. Using their API javascript, you could set and get suspend data like this:
doSetValue("cmi.suspend_data", yourdata);
yourdata = doGetValue("cmi.suspend_data");
Before getting and setting values, you have to do some setup work to initilaize the API connection. See their samples for code you can copy-paste, then hopefully once you have it working you can look at it an understand a little bit about what it's doing.