Forum Discussion
JavaScript Help Compile List based on user responses
Hi Heroes. I'm trying to put together an accessible sorting activity and rather than drag and drop, I'm planning to use custom button sets. Basically, users will see a word and select a category (A, B, C, D) using one of the radio buttons that they think the word fits under. I would use triggers to set the variable for that word to its respective category. Ex: Dog=CatA; Happy=CatB.
I then want to have a summary slide where the user can see a list of all the words that they put into category A, category B, etc. with it nicely formatted as bullet points. Ex:
Cat A Cat B
-Penguin -Happy
-Dog -Sleepy
I was hoping to use JavaScript to compile those lists but cannot figure out how to make the lists work. I'm open to other solutions, too, because I have around 40 words users will identify.
Any help is greatly appreciated. Thanks!
- MariaCSStaff
Hi, Brian.
Thank you for reaching out!
I found a discussion that might be helpful for you, as Phil posted a sample .story file using Javascript that accomplishes something similar to what you're looking for:
While my knowledge of Javascript is very basic, here's a preview using the same idea:
I hope this helps as a starting point!