Explore the community Forums Lectora Lectora Questions & Answers Refresh parent page after closing popup

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #328475 Score: 0
    Profile photo of amanda hetherington
    amanda hetherington
    Member
    beginner
    intermediate
    friend finder
    curious george
    picture perfect
    wise owl
    contributor
    7 pts
    @ahetherington9113

    Hi

    I’m using Lectora 16.2, and I want to refresh the parent page after I close a popup window that I’ve launched from that page.

    The button from the parent page pops up a review question and then when the learner closes the popup window, I can’t get the status to update because the parent page is already showing (and “on show” doesn’t work).

    I want to show tracking that the popup has been visited (if question is correct, is in progress if question is incorrect, is not started if question is not attempted).

    Can anyone help with this please?

    Thanks

    Amanda

    #328498 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    209 pts
    @Klaatu

    Can you post a sample of what you have?

    #328556 Score: 0
    Profile photo of amanda hetherington
    amanda hetherington
    Member
    beginner
    intermediate
    friend finder
    curious george
    picture perfect
    wise owl
    contributor
    7 pts
    @ahetherington9113

    Actually, I ended up changing the structure so the button uses a Go To action rather than Popup window action. Now, when the learner returns to the parent page, the On Show action works.

    To clarify what I was trying to do:

    -from the parent page, a button opens a quiz question in a new popup window

    -when you close the window, you return to the parent page

    -I’ve got a status indicator on the parent page to indicate whether the question has been attempted

    -I wanted the status of the question to change on return to the parent page, but because I’m not entering the parent page again (as this has already happened), the On Show action won’t work and I couldn’t figure out how to refresh the status of the question (or questions when there were multiple on the same parent page).

    #328557 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    209 pts
    @Klaatu

    You should be able to put (window.opener.location.reload();) in an onunload script on the popup page that will refresh the parent when the popup closes.

    #328567 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
    354 pts
    @timk

    You can also add an action group to page with the status indicator that contains all the actions to modify the status of the popup page. Then follow Darrels approach, with a Run javascript action on the page in the popup:

    On: Hide
    Action: Run javascript
    Javascript:
    opener.runGroup_og1234();

    Replace og1234 with the html name of your action group. This way you won’t have to fully reload the page.

    Tim

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

You must be logged in to reply to this topic.