JS for programs score

Hello,

I create queez program with many slides in three modules.
When I shut the program all progress and score are gone.
So I need to create javascript with localstorage which will remember it.
(Javascript can be implemented in program of course).

The mechanism is: student works on slides, after succesfull passing the slide
he gains 1 point, after 20 points he gets 1 special point, the points then go to zero,
but special points no! And if he decides to shut the program I want the browser remember the Special points.
Is it posibble?

you'll get even more results using the forumsearch :slight_smile:

Thank you for advise but I have read this topic and many others, but

  1. I´m not familiar with JS, but I know I can use it I get something similiar
    with remembering the password and it worked.
  2. the topics on forum counts visiting or something like this, and it is not my case.

The local storage will store what ever you want if you structure for user name and password.

All activity while they are logged in is stored under their name ./ password/id

The key for you is having the storage log individual users and when a user logs in retrieve the storage associated to them if it exist.

The link @h_classen should get you going and I wrote about this also here,
Best read the whole thread though

Hi Sir,
I am trying to store the score on local storage. For some reason it is not working. This is what I put:

if(localStorage.loggedInUsrEmail !== undefined){    // get details from logged in user

var usrObj = JSON.parse(localStorage[localStorage.score]);
document.getElementById("loginPara").innerHTML =  score;

It is difficult to ascertain what you are trying to do from the snippet alone; if you can attach a zip of your .hype document that would be useful.

Hi Sir,

Do you have an email where I can send you my project. I have fixed storing the score onto local storage but I am unable to put the score into a html table.

Regards,

Anjali

You can zip it and upload on the forums (either by dragging into the text field or via the “upload” button above the text entry area. If it contains private information or you do not want it spread, then you can send it to support@tumult.com.