Storyline JavaScript trigger

Aug 23, 2023

I have a textbox which has some text content inside it and I need to print it in console so that I can use those text further

2 Replies
Jose Tansengco

Hello Neha Bharti,

Happy to help!

I'm not familiar with Javascript, but an alternative method that you can use that doesn't rely on Javascript is to simply store your text in variables and then call them whenever you need to. You can then check out this ELH posts which discusses how to send variable values to Javascript:

I'll let other members of the community chime in incase they have a more direct solution which uses Javascript!

 

Walt Hamilton

Like Joe says, put the text into a variable, and It is available to you later. You can use it the way he did, as a message to the learner. (you can put other words with it, like Hi there, message.)  Or you can use it in the condition part of a trigger. For example, Change state of rectangle to Red if message = "fire".