Need Help!
November 12, 2013 12:00 AM
Instead of having a button on the course which exits the title; I wanted a button to open a popup window which asks the user 'are you sure you want to exit the course: Yes or No'.
Now, I can use the action: Exit Title/Close Window to close the popup window (no button), but how do I get the other (yes) button to exit the title?
Regards
Jawad
Discussion (7)
You could use a fake pop-up window. Create an outlined text box with your ok and cancel buttons along with a semi-transparent gray gif to cover the page if you want. Place these on your last page as a hidden group which will "pop-up" when a user presses the first exit button. Because these are all on the same page, the exit title/page action will work correctly.
Maybe there's a way to do this with modified variables, but the above always worked fine for me.
If you check "Always on top" on the group properties tab, this should place it on top of any top of title objects, including those checked as "Always on top."
@rwalters 57286 wrote:
You could use a fake pop-up window. Create an outlined text box with your ok and cancel buttons along with a semi-transparent gray gif to cover the page if you want. Place these on your last page as a hidden group which will "pop-up" when a user presses the first exit button. Because these are all on the same page, the exit title/page action will work correctly.
Maybe there's a way to do this with modified variables, but the above always worked fine for me.
I've tried something similar to this, except the problem I was getting, was that my group was never 'always on top'. Some content within various chapters would be layered on top of the 'exit group'.
Please see the attachment.
That "Exit Button" group is set to "Always on Top", but so are various objects within the chapters.
Did you make sure that the fake popup was at the END of the course? If it is, it should be on a higher layer than everything else.
You could also experiment with displaying the fake popup as a Web 2.0 popup.
Grace
@graced 57363 wrote:
Did you make sure that the fake popup was at the END of the course? If it is, it should be on a higher layer than everything else.Nope, it won't work like that. When publishing, Lectora will still consider anything outside of chapters "on title level", which is obscured by anything in the chapter.
So there is no Lectora-based solution for Jawad. But you can add a class to all your fake popup elements and then use JavaScript to change their Z-index.
Another method is to put your fake popup on a separate page and send users to that page when they want to exit. Make sure that "Cancel" button is set to "Go back". It's not as sexy as a real popup, but it does work.
Discussions have been disabled for this post