Web Object issue

Feb 18, 2015

Hi: I want to insert a web object that collects data from the learner before allowing the learner to move forward. Once inserted, he or she needs to click an "update" button in order to submit. Does anyone know how to force the user to click "update" before moving forward to the next slide? I can't just add a trigger because I can't select the "update" button. 

Hope this is clear. Anyone have any ideas? Thanks. d

4 Replies
Steve Flowers

Hi Dierdre - 

Where does the Web Object reside? How you deal with this will differ based on whether it's an internally included web object or something that exists on another domain. If it's internal, you can use a variable in the parent of the web object frame and change that variable to trigger a listener (a trigger with a When Variable Changes event) to do something like activate the next button. If it's internal, let me know and I'll post something that should get the job done for you.

If the Web Object resides at another domain, you'll want to use Sergey's approach (using PostMessage()) here:

https://community.articulate.com/discussions/building-better-courses/communication-between-storyline-and-3rd-party-content

Steve Flowers

Safest way is using PostMessage. However you could try using a simpler setup:

  • Create a true / false variable with default false (for example, xTrigger)
  • Make the Next button disabled by default. On the slide containing the web object, create a trigger to listen to a change in this variable value of xTrigger. Change the state of the Next button to normal when the variable changes.
  • From within your Web Object (you'll need to be able to edit the code in the Web Object), setup some JS to do something like this when your update button is pressed: parent.GetPlayer.SetVar("xTrigger","True");

Your SL file will detect the change in the variable and execute the trigger.

This discussion is closed. You can start a new discussion or contact Articulate Support.