Display message appears on next page

schapman1885 Community Member Posts: 53
I have a drag-and-drop interaction that is custom coded. The learner can drag an item, then click the Submit button to evaluate the answer and displays a message in the pop-up box. However, if the learner drag an item, then clicks the Next button, it evaluates the answer, displays a message in the pop-upbox, advances to the next page, and the message appears as text on the screen with an OK button. If you click the OK button, the text disappears.  How do I prevent the advance to the next page until the learner closes the box by clicking OK?


  • smiller7502
    smiller7502 Community Member Posts: 181
    The simplest way is probably to disable the Next button on page show, and then enable it when the learner clicks Submit.
  • zliquorman1276
    zliquorman1276 Community Member Posts: 67 ☆ Roadie ☆
    When you say "custom coded", do you mean you coded a drag-and-drop interaction via JS on an HTML object? Or something else?

    If the former, I would tie the "Next Page" action to the clicking of the "OK" button. Is the message that appears on-screen custom-coded as well?

    Depending on the specific implementation, it might even be easier to remove the Lectora-default "next page" action for that slide, and replace it with your own custom-code that navigates to the next page which you could tie directly to the "OK" button.
  • schapman1885
    schapman1885 Community Member Posts: 53
    Stan: Yes, I thought of this first. Just curious because on a quiz question, this doesn't happen. wondering what code is invoked that prevents it from moving to the next page.

    Zachary: Yes, I bypassed the normal correct/incorrect for an action group (because the client wanted individual feedback per item). Suggestions on overriding the Next page action? The Next button is on the template... which is a level above the interaction.
  • schapman1885
    schapman1885 Community Member Posts: 53
    Also, this behavior is, of course, different in different browsers.....
  • zliquorman1276
    zliquorman1276 Community Member Posts: 67 ☆ Roadie ☆
    You would disable the "next page" action for that specific slide by changing that slide's inheritance settings to exclude the next button from the template. Then, you could just copy and paste the button from the template to that slide, and then any tweaks you make to it on that slide will only be to that slide since the button there is specific to it only, and not the template.
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916 ☆ Roadie ☆
    Zachary solution is the easiest one.
    Another option is disable the nextButton onPageShow... then re-enable it when needed.
    I am not sure whether the disabled option is only in Lectora Online or also for Inspire/Publisher.
    If its not, another option to disable a button (or whatever interface element ) is adding a blocker on top of it.
    A shape or transparent png that shows on top of the clickable element and thus prevents the user from clicking..

    Even an empty textbox can work as a blocker ;-) Noticing that often in delivered projects... ;-)
  • schapman1885
    schapman1885 Community Member Posts: 53
    Math: Any idea why I don't see this behavior on a quiz page? I'm not sure why it doesn't act the same way. (le sigh)
  • timk
    timk Community Member Posts: 1,239 ✭ Legend ✭
    I can reproduce the error in Lectora 17.1.5.

    I think, the popup action in the group doesn't interrupt the "Go to" at the button because these are separate action sequences, i.e. the popup action doesn't know that there's a "Go to" action. The second part of the error probably happens due to Seamless play. It can be solved by moving the "Go to" action from the button to the group.