Forum Discussion
variables with text entry help
April, Brian's solution will probably do what you want.
However, if anyone wants to trigger something directly from the value you type into an input text box, then you can do something like this. In the example, as you type into the box, the current value is displayed. When it matches the target value that you set, the red box is triggered. No pressing enter or clicking required.
https://360.articulate.com/review/content/35f36820-20f1-4e4e-ab5b-97b9342f490e/review
It uses a small piece of JavaScript to "listen" for changes to the input box's contents. It doesn't need to have them committed before it can respond. The event listener is only active when the input box has focus.
Next challenge, Nathan_Hillard! If I copy your excellent example more than once in a story, the 2nd slide doesn't function properly. I suspect it has to do with the single txtInput variable. I know nothing about Java, so can't determine if that's the issue.
- Nathan_Hilliard2 months agoCommunity Member
Yes, that example only located the first input box. I modifed it (attached) so you can specify a name for each text entry (right click text entry in timeline, select Accessibility). Give each text entry a unique Alt Text name. Set this name also in the inputTagName variable (top trigger on each slide). Set the targetValue variable in the trigger list too. Now it should locate the input you specify on each slide and compare it to the indicated target value.
If you wanted more than one per slide, you would need some extra variables to track the tag names and target values for each.
- TanyaStillman-731 days agoCommunity Member
Thank you! I'll give this a try!