Forum Discussion
ManjunathKrishn
29 days agoCommunity Member
Access question button status using JavaScript in storyline 360
Hello Team,
I was wondering if anyone knows how to access question (multiple choice/multiple response) button status (selected/unselected) using JavaScript in storyline 360?
- SamHillSuper Hero
Hi ManjunathKrishn you can access all of the individual Radio Button or Checkbox elements and their "selected" state using the following script. I'm not sure how you are looking to access and use the values, therefore this is a basic indication of how the values are accessed.
// Returns an array of all Radio Button and/or Checkbox elements const inputs = document.querySelectorAll('input[type=radio],input[type=checkbox]'); // To access the individual "selected" state, you can use the "checked" property. // Returns true or false. let input01status = inputs[0].checked console.log(input01status);