Forum Discussion
- JonasGretzerCommunity Member
I got it to work now. Using this js-code
var player = GetPlayer();
player.SetVar("variable1", "");
player.SetVar("variable2", "");
player.SetVar("variable3", "");
But now "NaN" is displayed in the entry boxes. Do anyone have a solution for this..? - WaltHamiltonSuper Hero
JS returns text content to SL variables. "" is text, so you get "NaN (Not a Number").
If the variables are set to a default value of blank, when you revisit the slide, the entry boxes should be blank if the slide is set to return to initial state on revisit. You may need to set the variables to 0, but I don't think so.
- JacekKuczyns045Community Member
Walt, it's not possible to reset "numeric entry" into blank.
Jonas, can you use the text entry instead? If so, you can reset them into blank.
- WaltHamiltonSuper Hero
Jacek,
You're right, you can't reset them to blank. What I was thinking of is that if they have a default value of 0, they show blank, but only until they receive a value. So Jonas would have to restart the course to get them blank.
- JonasGretzerCommunity Member
Thank you both for reply!
I don't want to use text entry so I now set them to 0. It is not perfect, but this will do for this time!