Explore the community Forums Lectora Lectora Questions & Answers Help on a variable…

Tagged: , ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #283312 Score: 0
    Profile photo of Jawad
    Jawad
    Member
    beginner
    intermediate
    contributor
    friend finder
    wise owl
    1 pt
    @Jawad

    Here’s the task:

    Page 1 has a pop-up appear in the form of a ‘group’ which the learner has to close in order to progress on page 1.
    The pop-up is just an image with a button included (all elements are on the same page).

    Page 2, when the learner reaches this page, they have to return to page 1 again. However, the pop-up
    should no longer appear on page 1 on return and from this point onwards.

    How can I achieve this result?

    #286979 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    333 pts
    @timk

    Create a variable e.g. “popup_closed”, initial value “0”

    Add an action to the close-button:

    On: Click
    Action: Modify variable
    Target: popup_closed
    Type: Set equal to
    Value: 1

    Add an action on page level:

    On: Show
    Action: Hide
    Target: Your_popup_Group

    Condition:
    Only if “popup_closed” equal to “1”.

    Tim

    #286978 Score: 0
    Profile photo of Daryl Fleary
    Daryl Fleary
    Member
    beginner
    intermediate
    advanced
    friend finder
    LUC16
    LUC16 Attendee
    contributor
    wise owl
    verified member
    17 pts
    @dfleary

    You can also accomplish this without using any variables by taking advantage of the built in status tracking feature of Lectora:

    On page 1, add an action:
    – Trigger: On Show
    – Action: Show the group
    – Condition: This Page, Is Not Started
    – Else Action: Hide the group

    The first time the student hits the page it Is Not Started so the group is shown. Then the page is set to Completed. So anytime the student returns to the page the status is now Completed and the group will be hidden.

    Daryl Fleary
    Product Manager
    Trivantis

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.